cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault and working reverse GPIO Pins

Zek_De
Senior
Posted on September 14, 2017 at 15:12

Hi friends,

I've got problems with STM32F0 series also same F1 now my real problem is getting a HardFault ,when I try to work with Nrf24lWhen process arrive this line 'TM_NRF24L01_SetTxAddress(&hspi1, TxAddress);' getting HardFault ,I see it with debug.Also extra matter is HAL_GPIO_WritePin(...); working reverse ,why is it ? Everything seems good under the codes.I'm thinking about Hardfault related with stack maybe I dont know.I've sent project.I havent sloved it for a long time but now again I need it.Stm32f4 is Ok .No HardFault error.Same code ,same process with stm32f4

Note: this post was migrated and contained many threaded conversations, some content may be missing.
12 REPLIES 12
Posted on September 15, 2017 at 02:03

hspi->Instance->DR = *((uint16_t *)pData); // Like I said, casting an unaligned pointer, pData likely not an EVEN address

{

uint16_t data;

memcpy(&data, pData, sizeof(uint16_t));

hspi->Instance->DR =data;

}

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Zek_De
Senior
Posted on September 16, 2017 at 13:07

I said about working pin reverse actually it had been related stm32 kit ,I hadn't reliased it.I'm correcting this.
Zek_De
Senior
Posted on September 16, 2017 at 13:09

I said about working pin reverse actually it had been related stm32 kit ,I hadn't reliased it.I'm correcting this.