cancel
Showing results for 
Search instead for 
Did you mean: 

Where am I going wrong in reading data from ADE7913 EVAL-Z Board on STM32L4R5ZI ?

MKaul
Associate

I’m trying to read IWV register from ADE7913 Eval-Z Board using STM32L4R5ZI Nucleo board. I’m not being able to accomplish the same due to some reason I cant understand. I’m using HAL_SPI_Transmit() to transmit the command byte to start reading register IWV(address: 0x00). The value I want to transmit is 0x04 but HAL_SPI_Transmit is returning HAL_ERROR.

I debugged line by line and found where the issue arises. It’s inside SPI_EndRxTxTranction() , function used to check the end of transaction.

I’ve attached the code file. Please can someone check and tell me where I’m going wrong. I’ve initialized SPI parameters as well as the GPIO parameters of SPI peripheral and CS(3 I/O pins). And have also followed the logical structure of reading from ADE7913.

Please let me know where I’m making a mistake.

0 REPLIES 0