STM32 Microcontroller + MCF8316C Driver

Hi,

I am currently designing a FOC motor driver with a MCF8316C chip from TI and I am having quite a lot of troubles to get it to work. I plan on controlling it with a PWM signal coming from a Nucleo-f429zi board from stmicroelectronics.

The chip default setting is for it to work with analog input. It is possible to change that by changing the register with I²C commands. However, I understood from the TI Forum that the protocol of the device is flawed (unusual ID, needs delay between each byte package or to set the speed to 10 kHz instead of 100kHz). I’ve done all that but the driver just won’t work I am relatively new to coding so I am a bit lost.

So far I’ve sent the config that i want to the register, then sent the command to save the config in the shadow register to the eeprom, then tried to read the changed register but the output doesn’t make sense. Instead of having 0x00000001, I have 0x003f59b0. Since the default setting is 0x00000000 and I haven’t changed anything else I don’t understant why I have this. I looked at the frame sent and I don’t see anything wrong.

Here is the link of the datasheet : https://www.ti.com/lit/ds/symlink/mcf8316c-q1.pdf

[grid]

Someone has any idea on what I am doing wrong?


This is the graph of the frame sent to save the register.


This is he commad to save it in the eeprom


This is the commud to ask the device to read the register


And this is the data the driver is sending. As you can see, it’s different from the data I sent in the begining.

It’s just a wild guess, but since the control registers are two bytes long, you might have to send two bytes?

Also might check if the register writes in little endian or not.
Send high byte first or last? I’m sure the experts know better then me.

I can’t help but wanted to cheer you on because I really want a board with the MCF8316! Will you make it available somehow? (paid, open source, etc)

You are right. Control word is actually three bytes. I tried to go through the datasheet again and the protocol is way more crowded than I am used to. I will try to add the missing control word bytes and tell you if it worked.

I never really thought about it as a possibility but now that you mentioned it why not