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

uart on NRF51822

Hello,

I have an development kit NRF51 and wrote a code for it which uses uart, ble advertising and ble scan. It works pretty well on the kit.

The problem is when I try to put the same code on a custom board with an NRF51822. I have already worked with other code for this custom board like ble_app_beacon and it worked fine, but with this code I'm working I got many problems. It doesn't work at all and on the custom board and if I comment all uart things it seems to run very very slow.

So I tried to get just the uart to work first using the code bellow but it doesn't work, it just throws garbage at the terminal. It doesn't work with the custom board but with the development kit it works perfectly.

I'm using SDK 10, S130, gcc and eclipse. My board has a crystal of 16MHz.

Does anyone knows what is the problem?

/**
 * @brief Function for application main entry.
 */
 
int main(void)
{

    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
    uart_init();
    app_uart_putstring((uint8_t *)"\n\r12345 Test!");

    // Enter main loop.
    for (;; )
    {
    	power_manage();
    }
}
Related