Hello,
when use FTM PWM, i find when use uart to printf the log, the PWM doesn't work,
but when remove printf, then the pwm output the correct waveform.
could you help to check it what is the reason ?
i attached the project, please test it.
duty_cycle=0x0,pwm status=0x1
duty_cycle=0x2000,pwm status=0x1
duty_cycle=0x4000,pwm status=0x1
duty_cycle=0x6000,pwm status=0x1
duty_cycle=0x8000,pwm status=0x1
Hi Alice,
There is something wrong with the console lib, but we don't have the capacity to debug this SW.
Why don't you use the LPUART SDK driver directly?
The printf() uses LPUART_1 anyway.
Regards,
Daniel
@danielmartynek i try it with this
void uart_printf(const char *ptr)
{
uint32_t bytesRemain;
size_t bytes=strlen(ptr);
// unsigned char ret_car[]={"\r"};
LPUART_DRV_SendData(INST_LPUART_1, (uint8_t *)ptr, bytes);
while(LPUART_DRV_GetTransmitStatus(INST_LPUART_1, &bytesRemain) != STATUS_SUCCESS);
// LPUART_DRV_SendData(INST_LPUART1, ret_car, 1);
// while(LPUART_DRV_GetTransmitStatus(INST_LPUART1, &bytesRemain) != STATUS_SUCCESS);
}