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

ble_app_hrs_rscs_relay not printing out text well.

Hello, I have an issue with ble_app_hrs_rscs_relay that doesn't seem to exist with the other sample projects.

The project compiles without any issues, but when I run it the console does not output properly: image description

Instead of writing out "Relay Example\r\n" it seems to write just the R and line feed characters.

This does not happen with other projects. I can for example load up another project I am working on which uses the same underlying print mechanism and it will print things just fine. It seems to be exclusive to this one Keil project but my knowledge of Keil is non-existent and finding the proper wording to describe what is going on results in a myriad of other posts not relevant to what I am looking for. It looks like the demo runs as intended.

For the record, I am using the pca10028/s130/arm5_no_packs version of the ble_app_hrs_rscs_relay project in SDK11.

I'm also using Keil 5 just to clear up any misunderstandings.

Parents
  • Hi, there is a bug in the uart log implementation in this example, and has been reported internally. A quick fix should be to replace the fputc() function in retarget.c with this one:

    int fputc(int ch, FILE * p_file) 
    {
       UNUSED_PARAMETER(p_file);
       uint32_t err_code;
       do
       {
           err_code = app_uart_put((uint8_t)ch);
       }
       while(err_code == NRF_ERROR_NO_MEM);
    
       return ch;
    

    }

    Another alternative is to import the nrf log module from a non-experimental SDK example.

Reply
  • Hi, there is a bug in the uart log implementation in this example, and has been reported internally. A quick fix should be to replace the fputc() function in retarget.c with this one:

    int fputc(int ch, FILE * p_file) 
    {
       UNUSED_PARAMETER(p_file);
       uint32_t err_code;
       do
       {
           err_code = app_uart_put((uint8_t)ch);
       }
       while(err_code == NRF_ERROR_NO_MEM);
    
       return ch;
    

    }

    Another alternative is to import the nrf log module from a non-experimental SDK example.

Children
Related