@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);
}
void test_pwm()
{
//pwm_init();
uint16_t duty_cycle[] = {0,0x2000,0x4000,0x6000,0x8000};
uint8_t len = sizeof(duty_cycle)/sizeof(uint16_t);
status_t st = STATUS_SUCCESS;
while(1)
{
for(uint8_t i = 0;i<len;i++)
{
//set_pwm_duty_cycle(0,duty_cycle[i]);
st = FTM_DRV_UpdatePwmChannel(INST_FLEXTIMER_PWM_1,
flexTimer_pwm_1_IndependentChannelsConfig[0].hwChannelId,
FTM_PWM_UPDATE_IN_DUTY_CYCLE, duty_cycle[i],
0U,
true);
uart_printf("test_pwm\n\r");
OSIF_TimeDelay(100);
//OSIF_TimeDelay(10000);
}
}
}
still the same, there is no pwm output when use uart_printf, could you help to check, how to implement the printf funciton , thank you very much!