Page 1 of 1

Multiple bugs in UART1 - I2C - PWM - components

Posted: Sun Jan 03, 2016 9:48 pm
by ARM
Device: AT91SAM7S512_64

********** Bug in UART1 (breakdown of UART0 and UART1 hardware interfaces): **********
When UART1 interrupt in macro "Sys_Initialise_Peripheral" is deactivated, the program is running.
When UART1 interrupt is active, UART0 cannot receive Bytes.

Note: UART0/UART1 of CPU & UART Channel1/Channel2 in the Flowcode component properties are reversed.
UART0=Channel2 / UART1=Channel1


********** Bug I2C (breakdown of I2C hardware interface): **********
When create I2C hardware component I get the following comiler message: see "1.msg"
The hardware I2C pins in the I2C component properties are not correct. They are set fix to pin C3 & C4.
Note: The Controller has one I2C interface on port PA3 & PA4
1.msg.txt
(2.31 KiB) Downloaded 342 times
When create I2C software component I get no comiler error (only warnings - see "2.msg") , but
there is no data transfer on I2C pins. (Macro: "IO_Expander_0_TXD_Test").
2.msg.txt
(3.57 KiB) Downloaded 330 times

********** Bug PWM (no breakdown but no frequency change possible): **********
Cannot change value of "DutyCycle" ("DutyCycle10bit") in running program in macro "_X12_Set_PWM_Frequency".
Value 0 & 1 & 255 (0 & 1 & 1024) PWM Frequency = 0 Hz
At all other values the PWM frequency is running with the frequency value set in the PWM component properties (183Hz).

Cannot change values with command "changePeriod". Command has no effect.

Cannot set in the PWM component properties "Period Overflow" the value to 65535 (maximum value of 255 is possible)
Test_5.fcfx
(80.75 KiB) Downloaded 298 times

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Mon Jan 04, 2016 11:24 am
by Benj
Hello,
When UART1 interrupt in macro "Sys_Initialise_Peripheral" is deactivated, the program is running.
When UART1 interrupt is active, UART0 cannot receive Bytes.
Hmm this sounds like a bug, I will investigate.
Note: UART0/UART1 of CPU & UART Channel1/Channel2 in the Flowcode component properties are reversed.
UART0=Channel2 / UART1=Channel1
It looks like this was a decision and is the same for all the current ARM family. Probably something to do with E-block port compatibility in earlier versions of Flowcode where only one UART was available.
When create I2C hardware component I get the following compiler message: see "1.msg"
The I2C peripherals on the devices simply don't work in a simple and compatible way as they do on the PIC/AVR so we had to remove I2C hardware support for these devices. The error is our generated warning message.
When create I2C software component I get no comiler error (only warnings - see "2.msg") , but
there is no data transfer on I2C pins. (Macro: "IO_Expander_0_TXD_Test").
The software channel is known to work so you shouldn't be having problems with this. Are you using external pull up resistors on the SCL and SDA pins.
Cannot change values with command "changePeriod". Command has no effect.
Cannot set in the PWM component properties "Period Overflow" the value to 65535 (maximum value of 255 is possible)
I will look into these issues for you too.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Mon Jan 04, 2016 1:47 pm
by ARM
Hello,

the resistors on I2C software pins I forgot.

Thanks.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Thu Jan 07, 2016 12:52 am
by ARM
Hello,

I have a new update for UART1 Bug. There is also a Bug in SPI Hardware Interface:


UART1 Hardware Interface Failure:

Pin connection failure in RS232 1 properties.
Connections:
TX = C6 (PA22) --> OK - PA22 (TXD1)
RX = C7 (PA23) --> Failure: PA21 (RXD1)



SPI Hardware Interface Failure:

Pin connection failure in SPI_Master1 properties.
Connections:
Miso = C4 --> wrong Pin
Mosi = C3 --> wrong Pin

Only SPI Software Interface is available !

I think there is the same problematics like the I2C Interface, where is also only as Software Interface available.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Mon Jan 11, 2016 4:33 pm
by Benj
Hello,

Right many thanks for letting me know.

I have changed the UART RX pin connection from C7 (PA23) to C5 (PA21).

The SPI hardware should be working, there is code for a single hardware channel in the CAL so it should be ok. Saying this the pins were wrong so these have also now been fixed.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Tue Jan 12, 2016 10:54 am
by ARM
When receiving Data in UART1 RXINT (Macro: COM1_UART1_RXINT_Test) UART0 and CPU crashes.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Tue Jan 12, 2016 11:11 am
by Benj
Hello,

Are you sure your reading the right UART for the interrupt you have enabled.

UART HW channel 1 relates to interrupt RXINT0
UART HW channel 2 relates to interrupt RXINT1

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Tue Jan 12, 2016 1:11 pm
by ARM
Yes of course,

HMI is running on UART Channel 2. The corresponding pins to these channel are PA5 and PA6 wich relates to RXINT0 in the CPU.
COM#1 is running on UART Channel 1. The corresponding pins to these Channel are PA21 and PA22 wich relates to RXINT1 in the CPU.
(seepage 35 of attachment)

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Tue Jan 12, 2016 3:58 pm
by Benj
Ok yes your right this looks correct.

Code: Select all

   // Call Component Macro: UART0_HMI::Initialise()
    FCD_047b1_UART0_HMI__Initialise();

    // Activate UART0
    // Interrupt: Enable RXINT1
    AT91F_US_EnableIt(AT91C_BASE_US0,AT91C_US_RXRDY);

Code: Select all

    // Initialise UART1
    // Call Component Macro: UART1_COM1::Initialise()
    FCD_047b2_UART1_COM1__Initialise();

    // Activate UART1
    // Interrupt: Enable RXINT0
    AT91F_US_EnableIt(AT91C_BASE_US1,AT91C_US_RXRDY);
The UART pins should now be show correctly in the latest FCDX.

I will investigate the interrupt problem here with a simple test program and see if there is a reason why it is locking up.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Sun Jan 31, 2016 3:33 pm
by ARM
Hello,

I have copy the latest bugfix files from 18.01.2016.

Activating the UART1 INT is ok. But when receiving data on Pin, all communication Ports and CPU crashes. The program does not jump in the interrupt macro.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Mon Feb 01, 2016 5:29 pm
by Benj
Hello,

I have tested both UARTs are working well with the RXINT interrupt here on the EB031 ARM hardware and everything seems ok and is working well.
ARM_UART_Test.fcfx
(6.33 KiB) Downloaded 248 times
ARM_UART_Test2.fcfx
(6.33 KiB) Downloaded 288 times
I'll have a look through the code to see if I can see why there would be a problem on your device: AT91SAM7S512_64.

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Sun Feb 07, 2016 9:34 pm
by ARM
Hello,

here a short description:

- When receiving data on UART1 RXINT Pin, CPU crashes.
Macro: - Sys_Initialise_Peripheral
- UART1_RXINT_

- When call macro "WIZ810MJ" "create Server Socket" CPU stops. Need them for web server or TCP/IP Industrial Ethernet communication.
Macro: - Sys_Initialise_Peripheral
Is it possible to store the web site files of WIZ810MJ on SD-Card?
Test_28.fcfx
(123.06 KiB) Downloaded 189 times

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Sun Feb 07, 2016 11:45 pm
by ARM
I had replace the Webserver (WIZ810MJ) to TCP/IP (WIZ810MJ) and CPU doesn´t stop now.

When did WIZ810MJ flashes the LED? After Calling Macro "Initialise"?

Re: Multiple bugs in UART1 - I2C - PWM - components

Posted: Tue Feb 09, 2016 12:30 am
by ARM
I had insert "TCP/IP Base WIZ810MJ" for Webserver or TCP/IP Industrial Ethernet. I had implement the Example Project "interactive Web Server". But I cannot connect to WIZ810MJ. Maybe there is an conflict with "SPI Master" component?

The connection of Ethernet module is ok, because when disconnect Module, Program stops at Macro "TCP/IP Listen".

When Calling Macro "TCP_IP_WIZ810MJ::RXDataAvailable" (Macro:_X13_Webserver_activity) and the PWM Channel is running,
PWM Channel turn on and off in about a second cycle. So he counts about every second 1 pulse further.
Test_30.fcfx
(133.31 KiB) Downloaded 189 times