Enabling RXINT on STM32F411CE hangs

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
Brendan
Posts: 54
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 42 times
Been thanked: 11 times

Enabling RXINT on STM32F411CE hangs

Post by Brendan »

Hello all.

I'm working on a project based upon the STM32F411CE, and need to enable RXINT2 (for completeness, channel 2 on PA2/PA3, no flow control). When enabled however, the code completely hangs at the point where the interrupt is enabled. No issues whatsoever with TxD though (reliable at 3Mbps).

I originally considered some issue with the associated ISR macro, but the same still happens with an entirely empty macro.

I should perhaps add that the chip is programmed over USB from the resulting .elf image, using STM32CubeProgrammer application.

Thanks for your help and support,
Brendan.

LeighM
Valued Contributor
Posts: 447
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 81 times
Been thanked: 243 times

Re: Enabling RXINT on STM32F411CE hangs

Post by LeighM »

Hi Brendan,
I am not getting any hang.
Could you attach a sample program that demonstrates the issue?
For example, are you initializing the UART component?

Brendan
Posts: 54
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 42 times
Been thanked: 11 times

Re: Enabling RXINT on STM32F411CE hangs

Post by Brendan »

Thank you Leigh.

Just checked in and saw your reply, whilst I prepare to extract company-confidential material and upload an example project.

Back soon, and thank you for your support.

Best regards,
Brendan

Brendan
Posts: 54
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 42 times
Been thanked: 11 times

Re: Enabling RXINT on STM32F411CE hangs

Post by Brendan »

Hi Leigh.

Further to the foregoing, I stripped out all underlying code and macros (necessary as it's regarded 'Company Confidential'), leaving basic project initialisation intact to the point where it would send 'UART OK' and thereafter hang with RXINT enabled. Toggle-disabling RXINT resulted in the project proceeding to run entirely to expectation without a hitch.

Oddly however, in stripping out the other code and macros results in RXINT working normally, as you discovered.

Anyway, here's the project with its beginnings intact, to which I've added a very simple test loop (light-coloured icons) to simply collect five bytes and print as a string.

With all else about as basic as you can get, possibly/probably something weird going on with the SPI, though the pull configuration initialises CS disabled (high) and works like a top with fast ADC transactions (etc), and I'm quite sure I switched initialisation of SPI and UART around in a desperate attempt to resolve.

Anyway, room for further analysis on my side, and thank you again for jumping in to support. If I should unearth the spanner in the works, I'll report back.

Thanks and best regards,
Brendan
RXINT_Hang_Example.fcfx
(18.97 KiB) Downloaded 10 times

stefan.erni
Valued Contributor
Posts: 997
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 190 times
Been thanked: 217 times

Re: Enabling RXINT on STM32F411CE hangs

Post by stefan.erni »

Hi Brendan

On my STM32F469 I can not use 3Mhz for baudrate, just 2Mhz is working

In Your programm:
2025-04-09_12-06-48.PNG
2025-04-09_12-06-48.PNG (43.1 KiB) Viewed 1441 times
regards

Stefan

Brendan
Posts: 54
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 42 times
Been thanked: 11 times

Re: Enabling RXINT on STM32F411CE hangs

Post by Brendan »

Hi Stefan.

I'm presently using the STM32F411CE to reliably drive a proprietary FTDI 232-3V3 USB-UART cable at 3Mbps, with all internal MCU bus clocks set to maximum permissible speed per STM32CubeMx application. This is required to support fast data reporting in real-time from SAR ADCs interfaced with a 3MHz SPI clock and 16-bit transacted data.

I overcame the weird RXINT2 anomaly by restructuring my code somewhat. Bizarrely, sending UART data (from MCU to host) soon after enabling RXINT2 originally highlighted an issue, but whether or not it had a negative bearing appeared to be dependent on the remaining code structure - very odd! Could well be compiler weirdness I suppose.

The project has grown quite substantially since such time, and still RXINT continues to perform without a hitch at 3Mbps (bidirectional data, no flow control), though once I've more time I will endeavour to strip out whatever may be construed as company-confidential information from the earlier problem project and make the modified source available to PM, if Flowcode support were interested.

Thanks and best regards,
Brendan

Post Reply