working on BSM system: s32k148 <-spi-> MC33772BSP2AE
communication and cells measurement works now,
trying to set MC33772B go to sleep mode, Spi write cmd such as
0x0, 0x1, 0x2, 0x1E, 0x5A, got feedback 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
sleep cmd not executed.
before this sleep cmd , previous read/write spi cmd all correct executed.
Do you know under which condition an all 0xFF feedback would replayed.
and any other action should be executed before send sleep CMD?
The datasheet I checked is "MC33772B Battery cell controller IC Rev. 6.0 — 2 April 2020 " as the chip we used is MC33772B,
thanks for your information, I will do some other test , then give you feedback.
Thanks for the correction, sorry about that.
On the MC33772B, under SPI communication, a local write command is necessary just as mentioned for the MC33772C. however, different from the MC33772C, the MC33772B, upon receipt of a "go to sleep" command, if the IC is being performing a conversion sequence, then the state transition is delayed until an EOC occurs (end of conversion); else, the state transition occurs immediately. In other words, the device goes to sleep mode only after all conversions in progress are completed.
If you check the attached state diagram image for the MC33772B, to go from normal mode to sleep mode, it is not only required to set SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1, but also EOC should occur (end of conversion).
To instruct the MC33772C to enter the Sleep mode, the user sets the SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1. If the communication type is TPL, only a global write command can be used, while in case of pure SPI communication, a local write command is necessary
I’m not sure why you got feedback when writing to the registers since, unlike the read command, for which MC33772C responds with data, the write command does not generate any response. When the slave receives a valid LOCAL WRITE COMMAND, the message is acted upon but no response is generated.
Thanks for your feedback!
the "response" may not correct, actually it's the echo of write command,
10.4.2 Write local command
Unlike the read command, which responds with data, the 33772 responds to the write
command with a single frame echo of the command and updated register contents.
a successful write cmd with correct echo
AFE_Tx = (0x0, 0x0, 0x26, 0x12, 0x20)
AFE_Rx = (0x0, 0x0, 0xA6, 0x12, 0x27)
but when trying to write SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1,got all 0xFF echo, and sleep not executed.
AFE_Tx = (0x0, 0x1, 0x2, 0x16, 0x0D)
AFE_Rx = (0xFF, 0xFF, 0xFF, 0xFF, 0xFF)
before this sleep cmd , I wrote three register : FAULT1_STATUS,FAULT2_STATUS,FAULT3_STATUS
all with correct echo returned.
so is there any precondition to write SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1?
Can I ask which version of the datasheet are you looking?
I’m looking into the version Rev. 3 — 4 June 2021 of the MC33772C (can be downloaded from NXP DocStore) where section 10.4.2 ‘Local Write Command’ specifies:
“Unlike the read command, for which MC33772C responds with data, the write command
does not generate any response. When the slave receives a valid local write command,
the message is acted upon but no response is generated”
And tables of this section (image below) doesn’t specify anything about an echo response.
There are no preconditions to write SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1, this should be straight forward and the MC33772C should go into sleep mode when setting this bit. As you can see in the state diagram image below, to go from normal mode to sleep mode, the only requirement is to set SYS_CFG_GLOBAL[GO2SLEEP] bit to logic 1.