Hi guys,
I share with you a modification of the blinky example for the RPi pico.
In this modification I use the RPi pico w, I modified the blinky pin of the LED and I call the debug_uart.c and debug_uart.h libraries.
The debug_uart_initialize() function will configure the UART to the standard 8 data bits, with a parity bit (null) and a stop bit (8N1) with a baudrate of 115200.
the debug_uart_send_String(āā) function is responsible for sending an unformatted string.
void main(void) {
RESETS->RESET = RESETS->RESET & ~0x00000020lu; // take IO_BANK0 out of Reset
PSM->FRCE_ON = PSM->FRCE_ON | 0x00000400; // make sure that SIO is powered on
SIO->GPIO_OE_CLR = 1ul << 22;
SIO->GPIO_OUT_CLR = 1ul << 22;
PADS_BANK0->GPIO25 = 0x00000030;
IO_BANK0->GPIO25_CTRL = 5;
SIO->GPIO_OE_SET = 1ul << 22;
init_time();
debug_uart_initialize();
for ( ; ; ) {
// uint8_t data = 23;
SIO->GPIO_OUT_SET = 1 << 22;
// Delay
delay_us((10 / 1 * 60) * 1000);
SIO->GPIO_OUT_CLR = 1 << 22;
// Delay
delay_us((10 / 1 * (100 - 60)) * 1000);
debug_uart_send_String("Send string without formatting\n");
}
}
Iām working on the option to format the string, but still without success, there is a library in the LIB folder of the example project with a printf() prototype but Iām having difficulty correctly calling the functions declared there.