Page 1 of 1

Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Tue Jan 30, 2018 11:13 am
by dionyzoz
Hello,

I'm a new F7 32-Bit ARM user and just start my first projects on this platform. I choose low cost STM32F030RC chip and got some problem with interrupts. There are two interrupts: UART_RXINT1 and UART_RXINT2, which works well for USART1 and USART2 blocks. I need some help to construct interrupts from UART3 and UART5 receive pins. In attached file I use 3 UART blocks: UART1 (Channel1-USART1, TXpin- PB.6, RXpin- PB.7), UART2 (Channel3-USART3, TXpin- PC.10, RXpin- PC.11) and UART3 (Channel5-USART5, TXpin- PB.3, RXpin- PB.4).
File compiles with error - errors are in my own RXINT3 and RXINT5 interrupts. I tried to construct them like RXINT1 (which is ok). Could you help me to write interrrupts correctly?
Regards, for all Flowcode Users and MATRIX team.

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Tue Jan 30, 2018 1:11 pm
by LeighM
USART 3 to 6 have a shared interrupt USART3_6_IRQn
So things are more complicated.
I'll try and put some time aside to have a look and see if I can add interrupt support for USART 3 to 6 into the FCD for this device.

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Tue Jan 30, 2018 1:27 pm
by dionyzoz
Thanks so much for quick replay LeighM. I got developed PCB with that configuration: UART1 (RS485 for touch panel), UART3 (RS485 for external building automation) and UART5 (bluetooth module). That will be great to get some solution. Datasheets for ARM are much complex for me (before AVR's was used in my project).

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Tue Jan 30, 2018 2:52 pm
by LeighM
Hi,
Could you try the attached.
Drop the 32F030RC.fcdx into your Flowcode installation \FCD\ARM directory and re-load the project.
I've included a modified project that uses the new interrupts, it compiles but I don't currently have a target to test.
Hope it runs :D
Leigh

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Tue Jan 30, 2018 7:57 pm
by dionyzoz
I can't belive... You fix all 6 UART channels :shock: What can I say, you are really a specialist. I can finish my project now.
I will receive my board on friday. I will test it and write here about the results. With that all 6 UARTS, STM32F030RC is a very good chip for everyone
who want to relize low cost advanced projects. I checked all PWM and ADC channels, all works well. Good IC.
F7 for STM32 it's a great tool. Really good job, congratulations for Matrix Staff and big thanks for Leigh.

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Wed Jan 31, 2018 9:17 am
by LeighM
Thanks for the update, and yes, please keep us posted with progress with your project :D

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Thu Feb 08, 2018 9:03 pm
by dionyzoz
Hello,
I promise to write something about modification for STM32F030RC - file from LeighM. I checked interrupt from UART3 RX pin and it works very well. I connect TX to PC.10 and RX to PC.11. Everything works with HC-05 Bluetooth module. I can send and receive data by free BluetoothPro Android application. I add an Bluetooth tested example, maybe it will help someone. Aha, and something else. You can use XM-15 Bluetooth module instead of Bluetooth HC-05. FC7 Bluetooth HC-05 block works with both, but with XM-15 you got good transmissonon on longer distance (HC-05 10m, XM-15 30m in open area). Some bluetooth modules don't accept macros SetName and SetPairKey. You have to change it by USB/UART converter and AT commands. I will check interrupt from UART5 RX soon.

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Fri Feb 09, 2018 9:08 am
by LeighM
Thanks for that! :D

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Sun Feb 11, 2018 2:13 pm
by dionyzoz
Hi,
I tested interrupt from UART5 RX pin for STM32F030RC on friday evening. I need some help with this. I wrote new simple program:
Bluetooth module connected to Channel3-USART3, TXpin- PC.10, RXpin- PC.11;
UART to RS485 converter (VP3082) connected to Channel1-USART1, TXpin- PB.6, RXpin- PB.7, flow control pin PB.5;
UART to RS485 converter (VP3082) connected to Channel5-USART5, TXpin- PB.3, RXpin- PB.4, flow control pin PD.2.
Bluetooth module and converter on USART1 works very well. I can transmit and receive data without any errors (relay switching, receive data from chip).
By USART5 I can only receive data. It looks like not enabled interrupt. I know taht you haven't got board with that chip, but please try to look at that code at free time. Maybe You will find some solution.
Software for RS485 tests: RealTerm Serial Capture Program 1.99.0.27 + USB/RS485 converter

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Sun Feb 11, 2018 2:16 pm
by dionyzoz
Sorry for adding HEX file. Here is corect one.

Re: Interrupts from UART3 RX and UART5 RX for STM32F030RC

Posted: Mon Feb 19, 2018 12:20 pm
by LeighM
Could you try a 10mS delay after your SendChar loop, and before the setting of the direction pin back to 0?