2020-06-18 08:44 AM
2020-06-18 01:55 PM
You're missing some important & symbols.
HAL_SPI_Transmit(&hspi2, (uint8_t*) &temp_address, 2, 1000);
HAL_SPI_Receive(&hspi2, (uint8_t*) &returnData, 4, 1000);
2020-06-18 08:47 AM
Hi,
I'm trying to send some command data fron STM32F769NI-DISCO to an ADE9000 though SPI. But my program never send commands because a HardFault is triggererd when HAL_SPI_Transmit ... function is called .
Here is the function that causes trouble. What could be the problem, please ?
uint32_t SPI_Read_32(uint16_t Address) {
uint16_t temp_address;
uint32_t returnData;
ADE9000_ENABLE
temp_address = (((Address << 4) & 0xFFF0) + 8);
HAL_SPI_Transmit(&hspi2, (uint8_t*) temp_address, 2, 1000);
HAL_SPI_Receive(&hspi2, (uint8_t*) returnData, 4, 1000);
ADE9000_DISABLE
return returnData;
}
Thanks !
2020-06-18 01:55 PM
You're missing some important & symbols.
HAL_SPI_Transmit(&hspi2, (uint8_t*) &temp_address, 2, 1000);
HAL_SPI_Receive(&hspi2, (uint8_t*) &returnData, 4, 1000);
2020-06-19 10:07 AM
Thank you very much. This solved my problem!