8 years, 10 months ago.

Serial::set_flow_control not working with Nordic's NRF51-DK board

Hello, I'm trying to program nRF51DK with mBed but I'm encountering problems with the mBed::Serial class, that does not recognize the method set_flow_control() as its member.

Exporting the mbed project to KEIL and I found that it was because the platform doesn't have define macro for DEVICE_SERIAL_FC, so in SerialBase.h, the function set_flow_control() is not included.

Is there any possible solution or way around for me to still use mBed and take advantage of the HW flow control that is available in the board ?

Hi Maurizio, did you find any resolution for this problem? This problem also occurs on my NuCleo board (L152RE). Regards Pepijn

posted by Pepijn Visser 03 Aug 2015

Hi Pepijn, I discovered that MBed does not manage the serial flow control in nRF51DK board (for some reasons, that is not coded). However, I found a working way around: in the manual of the microcontroller I identified the register that needs to be set in order to enable HWFC. Once I did that, I realized that MBed already maps all the microcontroller's registers and gives them a name. Once I found the name of the register, I simply wrote it in my MBed code and set it to the proper value (for my board the code is: NRF_UART0->CONFIG= 1). I guess that in your board it should work similarly. The names that MBed gives to the registers of your board should be reported in mbed>Library Build Details>mbed_official/mbed>target_nucleo_L152RE>stm32l152xe.h or similar header file. I hope this help !

posted by Maurizio Banfi 05 Aug 2015

Thank you for a solution! I had this problem as well. Any chance we could get the Serial library updated to handle flow control for all using the proper method(s)?

posted by Steve Wald 26 Mar 2019
Be the first to answer this question.