I installed nrfgostudio_win-64_1.15.1_installer, nrfgo_sdk_2.3.0_setup and nrfprobe_v2_0_0_7252 to test nRFgo starter kit(nRF6700). I tried to test uart on nRF24LE1D. but the uart example didn't work. I don't see "Hello World!" from P0.5(TXD).
Did I miss something? How to do fix this bug?
thank you.
#include <stdio.h> #include "nrf24le1.h" #include "hal_uart.h" #include "hal_clk.h"
// Cusomization of low level stdio function. Used by for example printf(). #ifdef ICC8051 int putchar(int c) #else /presume C51 or other accepting compilator/ char putchar(char c) #endif { hal_uart_putchar(c); return c; }
// Cusomization of low level stdio function. Used by for example gets(). #ifdef ICC8051 int getchar(void) #else /presume C51 or other accepting compilator/ char getchar(void) #endif { return hal_uart_getchar(); }
// Repeated putchar to print a string void putstring(char *s) { while(*s != 0) putchar(*s++); }
void main(void) { // Configure TXD pin as output. // P0.5, P0.3 and P1.0 are configured as outputs to make the example run on // either 24-pin, 32-pin or 48-pin nRF24LE1 variants. P0DIR = 0xD7; P1DIR = 0xFE;
// Initializes the UART hal_uart_init(UART_BAUD_9K6);
// Wait for XOSC to start to ensure proper UART baudrate while(hal_clk_get_16m_source() != HAL_CLK_XOSC16M) {}
// Enable global interrupts EA = 1;
// Print "Hello World" at start-up putstring("\r\nHello World!\r\n");