This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5 temperature example uart problem

I cannot get the output from the is the example the UART buffer gets filled but there is no output to the tty.

The interrupts seem to be set, but I don't see the interrupt routine so there is no way that I can debug this

Any help would be appreciated

Thank you

  • What HW you use, what exact example project you use, have you tried pre-compiled HEX coming with SDK from Nordic, how you compile the project, flash the board, how you debug the thing, do you have logical analyzer or some oscilloscope to see actual signals on the wires (assuming you talk about classic wired UART!)... provide more info, you will get better answer;)

  • 0 walterLIte gravatar image walterLIte 1

    answered just now

    Thank you for your quick reply

    I am using a BLE400 board with an nrf51522_AA with the Software Development Kit > nRF5 SDK > nRF5 SDK v14.0.0 > Examples > Hardware peripheral examples -Temperature Example compiled and debugged with Keil and a JLINK debugger the printf buffer is getting filled but for some reason, there is no output I don't see the interrupt routine, where it is or when it is called

    On the hardware side, I know that the UART works,as I have it working on other different programs the on board LEDS do not indicate output in this case.

    I have step debugged the code, but don't see where the interpret routine is set in this program example or when it is called. Where can I set a breakpoint on the interrupt to see how it manages the call?

    I do have a logic analyzer and an oscilloscope, but it is not a hardware problem in my option.

    Again thank you for your response hope to hear your thoughts.

  • Well first of all nRF51 is only supported by nRF5 SDK up to v12.3.0 so how exactly you compile for this target from V14.0.0 examples? Not saying it is impossible but it means to add quite a lot of older H and C files and probably little bit more patching if you use any SDK module/library. To the breakpoints: there are all the guidelines how to debug nRF51 with Keil. However this will hardly help you, I think you don't even start the thing properly. Are you using radio stack (SoftDevice) or you run FW on "bare metal"? Have you ever run ANY firmware on this board? Normally people start slowly from the basics: just compile minimal FW which in the main function do infinite loop of some GPIO low/high toggling with reasonable frequency (like once per second or similar) so you can either capture it by LED or just oscilloscope/logical analyzer. Once this works you can go to UART examples.

  • Logical analyzer is great thing to debug SW problems!;) Forget about any loosy step-by-step programs, start from minimal FW and just play with GPIO lines' (PINs) values. If you reach that point then you know your FW boots on the HW correctly and you can go on easily. If you still insist on halt/step/run debugger then see tutorials by Nordic and others here and on blog zone.

  • Again thank you for your quick comment

    The peripheral\temperature\pca10028 peripheral\temperature\pca10036 & \temperature\pca10040 are all in the Nordic software examples pak and are nfr51 boards.

    It is running " Bare Metal" as all embedded systems in these examples are - as opposed to RTOS, RIOT-OS or others real time systems Yes, of course, I run Firmware- this is not the first time I've run "blinky" on these boards both as you say "Bare Metal" and RIOT-OS with success and proper output.

    I appreciate your comments and suggestions, however, I am trying to solve a particular problem and your suggestions are not addressing these issues

    Please take a few minutes to run this exact example to get some insight to my problem and let me know what your results are specifically of the UART call function ... \peripheral\temperature\pca10028\arm5\RTE\nRF_Drivers\nRF51422_xxAC\app_uart_fifo.c

    thank you

Related