Multiple bugs in UART1 - I2C - PWM - components
Moderator: Benj
Multiple bugs in UART1 - I2C - PWM - components
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 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").
********** 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)
********** 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 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").
********** 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)
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple bugs in UART1 - I2C - PWM - components
Hello,
Hmm this sounds like a bug, I will investigate.When UART1 interrupt in macro "Sys_Initialise_Peripheral" is deactivated, the program is running.
When UART1 interrupt is active, UART0 cannot receive Bytes.
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.Note: UART0/UART1 of CPU & UART Channel1/Channel2 in the Flowcode component properties are reversed.
UART0=Channel2 / UART1=Channel1
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 hardware component I get the following compiler message: see "1.msg"
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.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").
I will look into these issues for you too.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)
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Multiple bugs in UART1 - I2C - PWM - components
Hello,
the resistors on I2C software pins I forgot.
Thanks.
the resistors on I2C software pins I forgot.
Thanks.
Re: Multiple bugs in UART1 - I2C - PWM - components
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.
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.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple bugs in UART1 - I2C - PWM - components
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.
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.
- Attachments
-
- AT91SAM7S512_64.fcdx
- (17.3 KiB) Downloaded 243 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Multiple bugs in UART1 - I2C - PWM - components
When receiving Data in UART1 RXINT (Macro: COM1_UART1_RXINT_Test) UART0 and CPU crashes.
- Attachments
-
- Function_Test_19.fcfx
- (97.86 KiB) Downloaded 274 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple bugs in UART1 - I2C - PWM - components
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Multiple bugs in UART1 - I2C - PWM - components
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)
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)
- Attachments
-
- AT91SAM7S.pdf
- (718.78 KiB) Downloaded 282 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple bugs in UART1 - I2C - PWM - components
Ok yes your right this looks correct.
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.
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);
I will investigate the interrupt problem here with a simple test program and see if there is a reason why it is locking up.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Multiple bugs in UART1 - I2C - PWM - components
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.
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.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multiple bugs in UART1 - I2C - PWM - components
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.
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.
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Multiple bugs in UART1 - I2C - PWM - components
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?
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?
Re: Multiple bugs in UART1 - I2C - PWM - components
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"?
When did WIZ810MJ flashes the LED? After Calling Macro "Initialise"?
Re: Multiple bugs in UART1 - I2C - PWM - components
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.
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.