This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About nrf52832 pwm_driver configuration problem?

How do you do

E: \ Nordic \ nRF5_SDK_12 _f012efa 2.0-3 d \ examples \ peripheral \ pwm_driver pwm_driver routines of the path, image description

1.How to configure reverse polarity of the PWM output: when the first way is high level of the first two is a low level?

2.How to change two lines of PWM output phase: for the first two PWM high pulse in the middle of the first low PWM pulse all the way?as the chartimage description

Parents
  • Hi,

    the most significant bit[15] denotes the polarity. So if you want seq_value 0 to correspond to 0 V, you need to set bit 15 to 1. E.g. by using bitwise OR.

    m_demo1_seq_values.channel_0 = (m_demo1_top/4)*3 | 0x8000;
    
    1. Could be that you need to setup 2 pwm instances, and then trigger the start task with the delay you want. You will need to trigger this with PPI for more accurate timing.
Reply
  • Hi,

    the most significant bit[15] denotes the polarity. So if you want seq_value 0 to correspond to 0 V, you need to set bit 15 to 1. E.g. by using bitwise OR.

    m_demo1_seq_values.channel_0 = (m_demo1_top/4)*3 | 0x8000;
    
    1. Could be that you need to setup 2 pwm instances, and then trigger the start task with the delay you want. You will need to trigger this with PPI for more accurate timing.
Children
No Data
Related