I'm using the MC9S12ZVM to control a BLDC motor with one pole pair. As the sample project didn't work out so well, I tried to make a simple project to have basic rotation.
I can move the rotor to every of the 6 possible hall sectors, I do this by simply just changing the PMFVAL0..6 with the corresponding PMFOUTB and PMFOUTC registers. Unfortunately when I try to put all the 6 stages into a loop, it seems that only two of the six stages can be applied.
In the reference manual I read that PMFVALx is buffered and needs the LDOK Signal. Inserted that after every change of PMFVALx but it doesnt make a difference. PMFOUTB and PMFOUTC are unbuffered, because PMFFCG1_ENCE is set to 0.
I also watched some the registers I'm writing to. It seems that every register gets its proper value, except for PMFOUTB which only seems to know two values.
What am I doing wrong? Or what did I forget?
I would really appreciate your help, many thanks in advance.