12345 67890

"New Project" wizzard and Pins tool MCUXpresso for LPC845

Discussion created by 12345 67890 on Apr 5, 2019
Latest reply on Apr 15, 2019 by Sebastian Delrio

1.) The wizzard asks for driver inclusion. Why aren't the chosen drivers not automatically included, e.g. #include "fsl_gpio.h" in main.c when I chose the GPIO driver in the wizzard?

 

2.) Why do I have to call e.g. GPIO_PortInit(GPIO, port) manually, although I chose a specific GPIO in the Pins tool? I would suggest this to be done automatically by the Pins tool in clock_config.c (or pinmux.c). I think to read

somewhere

*************************

EDIT: Tutorial: Blinky with the NXP LPC845-BRK Board | MCU on Eclipse 

*************************

that on Kinetis version this is the standard (but haven't checked this).

*************************

EDIT: More bad on function WKT_Init(). DPDCTRL->LPOSCEN isn't set to "1" by this function when low power oscillator is chosen as clock source. Power has to be enabled manually in this case. This code doesn't work:

wkt_config_t wkt_config;
WKT_GetDefaultConfig(&wkt_config);
wkt_config.clockSource = kWKT_LowPowerClockSource;
WKT_Init(WKT, &wkt_config);

Changing the clock source and then init the peripheral doesn't work.

*************************

 

3.) LPC845-BRK example blinky: Why is GPIO configured twice? First in Pins tool (Direction: Output, GPIO initial state: 0, Mode: PullUp??? why this???) and then in main.c with "gpio_pin_config_t led_config" ?

Outcomes