Yuriy Vostrenkov

STPM33 register management issue

Discussion created by Yuriy Vostrenkov on Jun 6, 2018
Latest reply on Jun 19, 2018 by Yuriy Vostrenkov

Hello! I'm working at power metering device based on STPM33 connected to MCU with SPI bus. 

I do initialization for SPI host interface and initial reset of STPM33 as it described in Datasheet and Getting Started Guide and it looks like to be successful. 

But reading/writing registers dont have any results, reading any register every time returns the value of the first register (0x040000A0). For example reading of UART & SPI Control Register (address 0x24):

SPI read diagram

This behaviour is possible when CRC8 isn't correct, but it is calculated with algorithm from datasheet and double ckecked with CRC calculator. Another reason could be bad wirings of MOSI line, but I checked it many times and tried with three IC's. Anyone have suggestions for this problem?

 

P.S. Chip part number is 332, if this is important

Outcomes