Hi,
For one of our customers, Im am trying to implement a PWM Frequency Converter from 400Hz fixed frequency to 2KHz fixed frequency using SLG46826V. However, I couldn't make it.
I have checked the PWM Frequency Conversion example, there is a PWM Block which SLG46826V doesn't have. I have checked other PWM examples. The concept is okay but, I couldn't get the DUTY adjusted. Ideally, I want to read the duty from the 400Hz PWM signal and write it to 2KHz PWM signal. How can I achieve this application using SLG46826V? I have a board with SLG46826V, and we have some in stock. Also the quantity is low, therefore the customer will program them during production. Regards,
Caner Alp Electronix
Yes it is working now, however it is a bit inconsistent.
3583.PWM Frequency Converter.zip
I would add a probe at CNT0 and check when the nCSB pulse happens and compare it against the value of CNT2 at that specific moment. Maybe something needs to be tweaked.
I think the problem is the SPI Buffer value which keeps changing.
In the original example it stays as the same value. Can I achieve this behavior?
Also see section 17.3 SPI Clock synchronization of the SLG46621 datasheet.
Enabling the clock synchronization doesn't help either.
Looks to me that the SPI is loaded way too often, the period of the nCSB pulse needs to be adjusted and I think it needs to get the same period as the PWM.
I increased the time for the nCSB counter. Still doesn't look okay.
When I check the application notes, I see that SPI nCSB pin is not connected. So, do we have to connect it for simulation? or are the application notes missing that as well?
As informed before .Kindly use the same chip which is mentioned in the application note for understanding/working . Some time we cant migrate the design from one chip to another (here SLG46140V to SLG46621V) .
As the main feature was SPI as FSM buffer, however in SLG46620 this option was blocked due to some internal setting/bugs in bus connections.
Thanks
AB