Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4924

Reading a 16-bit word via SPI from a current sensor [STM32 & CubeMx]

$
0
0
I'm having problems to read my current sensor, which is located at the source leg of a power transistor.

This is my sensor datasheet TLI4970

This is my routine every 10ms:

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET); //Bring slave select low
HAL_SPI_Receive(&hspi1, (uint8_t *)&SPIRx, 2, 10); //Receive data
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5,...

Reading a 16-bit word via SPI from a current sensor [STM32 & CubeMx]

Viewing all articles
Browse latest Browse all 4924

Trending Articles