Hi All,
So I've been succesfully reading data from UART RX Register and toring it to an array of characvters. However, I'd like to do the same with a pointer and the code is not working properly. I'm sure I've done something wrong as I am rusty with my programming skills.
So here I have my UART interrupt handler
void USART2_IRQHandler(void)
{
if(USART2->ISR & USART_ISR_RXNE)
{
//Puts the value from the receive register to the string by checking the length of the array and incrementing it by that length
*(Serial_Data_Array_Received + strlen(Serial_Data_Array_Received)) = USART2->RDR;
int x = 1;
}
}
and here is how I am declaring my variable
char* Serial_Data_Array_Received;
When I run it on the debugger, the code goes to a Hard fault routine in assambly language.
I'm not sure what I'm doing wrong
I am using C99 and an STM32 uC
Cheers