Hi ,everyone:
i design a pwm driver ,that contain one timer(TIMER2) and 4 ppi interface.
1.pwm(ppi and gpiote) Now,i have a problem with it not be Synchronous .when i pause one of pwm pin(by ppi) then reopen( call hal_pwm_go()) it not work correctly. (see the attachment file and follow code) [code type="xml"] uint32_t hal_pwm_Pause(const hal_pwm_init_t* p_params) { .. NRF_PPI->CHEN &= ~(1 << s_ppi_chn[0]);//disable ppi bit NRF_PPI->CHEN &= ~(1 << s_ppi_chn[1]); }
uint32_t hal_pwm_go(const hal_pwm_init_t* p_params) { ... NRF_PPI->CHEN |= (1 << s_ppi_chn[0]);//enable ppi bit NRF_PPI->CHEN |= (1 << s_ppi_chn[1]); }
2.why go to hardfault,when i call sd_softdevice_is_enabled() at ISR(interrupt service routing)? how to do it?