ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.66k stars 2.97k forks source link

[TARGET_NRF5] serial_api.c doesn't seem to support a platform which CTS pin are not used #2474

Closed ytsuboi closed 8 years ago

ytsuboi commented 8 years ago

Problem

The TY51822R3 platform use nRF51822 (Rev.3) device and CTS/RTS signals are not connected to the mbed interface chip on this platform. When printf() function is called by mbed program, the program hangs most of time.

Thoughts

I am investing this problem now. But the code in TARGET_NRF5/erial_api.c assumes flow control by CTS/RTS. It should take care about non flow control platform as well.

ytsuboi commented 8 years ago

It hangs at https://github.com/ARMmbed/mbed-os/blob/master/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c#L290 and https://github.com/ARMmbed/mbed-os/blob/master/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c#L488

ytsuboi commented 8 years ago

Patched. Now, printf() works fine on TY51822r3. Still need to test on nRF51-DK. https://github.com/ytsuboi/mbed-os/commit/0b79028731ac7f2baa50f96a6ce7597681267e11

Can I make a pull request after testing with nRF51-DK? @anangl @0xc0170

ytsuboi commented 8 years ago

PR made. https://github.com/ARMmbed/mbed-os/pull/2482

nuket commented 8 years ago

This hang is also biting me hard on the nRF51-DK.

ytsuboi commented 8 years ago

https://github.com/ARMmbed/mbed-os/issues/2489

sg- commented 8 years ago

Can you confirm is #2535 resolved this issue?

ytsuboi commented 8 years ago

PR made https://github.com/ARMmbed/mbed-os/pull/2555

nvlsianpu commented 8 years ago

@ytsuboi Could you close this issue?

ytsuboi commented 8 years ago

Solved! @nvlsianpu