AnsweredAssumed Answered

lpcxpresso845max_ctimer_pwm_example from SDK_2.x_LPC845

Question asked by 12345 67890 on Apr 28, 2019
Latest reply on Apr 29, 2019 by ZhangJennie

Hi, following an advice I imported the examples from the SDK in the title, because the examples for my LPC845-BRK are very buggy. The boards differ of course (64 pin MAX, 48 pin BRK and so on), but for understanding the drivers the pure code should be good.

So I imported the example in the title. Here is a part of pin_mux.c:

What's that? PORT2, 4 and 5 on a LPC845? It has only PORT0 and PORT1. And where does pin 20, 44 and 45 come from?

 

And the readme.txt doesn't say anything about on what pin the PWM comes out of the chip. And a scope or logic analyzer should be recommended/optional to watch the PWM at PIO0_28. Without that the example is pretty boring.

 

And in main:

1.) 2 lines later, with BOARD_BootClockFRO30M(), the FRO with 30 MHz is selected as main clock source. Not 12 MHz.

2.) And 1 line later BOARD_InitDebugConsole() contains CLOCK_Select(BOARD_DEBUG_USART_CLK_ATTACH), so it's called again in board.c. So the code in the screenshot above should be deleted completely.

Outcomes