System:
LPCXpresso55S28 Revision A2
Jumpers: J10 off, P25 on, J7 on, P1 off, P3 - 3.3V, J3 - Loc, USB - FS
Dev Software:
IDE: MCUXpresso IDE v11.3.0 [Build 5222] [2021-01-11]
SDKs:
SDK_2.x_LPC55S28, Version 2.9.0 (Eplugsite 415 2021-01-15), Manifest version 3.8.0, location <plugins>/com.nxp.mcuxspresso.sdk.sdk_2.x_lpc55s28_2.9.0.201911251446;
SDK_2.x_LPCXpresso55S28, Version 2.9.0 (435 2021-01-15), Manifest version 3.8.0, location <common>\SDK_2.9.0_LPCXpresso55s28.zip
Firmware:
Steps:
1) Create new workspace directory
2) Run NXPXpresso and select the new workspace based upon name created in 1)
3) Select Import SDK Example(s) from quick menu.
4) Presented with 2 pictures of the dev board. Why are there two???
5) Click on LPC55xx drop down to see LPC55S28 and click on it.
6) Presented with SDKs for selected MCU
7) Select SDK_2.x_LPCXpresso55S28. I did this because it is the LPCXpresso dev environment. Is this correct?
All buttons on bottom still greyed out. Why?
9) Select image of the board on left due to mouseover saying it is LPCXpresso while one on right does not include the words LPCXpresso.
10) Next icon becomes no longer greyed out. Select "Next"
11) Presented with Import Projects.
12) Drop down driver_examples
13) Drop down gpio
14) Select checkbox for gpio_led_output
15) Select finish button
16) Select left hand bug icon in menu to start debug.
17) Pop up appears showing LPC-Link2 CMSIS-DAP V5.361 SN PQA0AQHR. Select the row.
18) Select Ok button
19) Hits breakpoint at line 58
20) Press F8 button
21) Console presents:
GPIO Driver example
The LED is taking turns to shine.
Standard port read: 402c0
Masked port read: 40000
22) Press "User" switch S2 ( I also pressed and held it continuously and still no result.
23) Nothing happens. LED does not illuminate.
Debugging:
I stepped through the code and see that gpio_pin_config_t led_config is set to a digital output but switch is not configured at all. Is this because it is a default to be an input pin??
Set breakpoint on line 110 and found that when running this is never hit, thus, no printf.
I modified the while loop to see what was going on with the register like this:
while (1)
{
port_state = GPIO_PortRead(GPIO, APP_SW_PORT);
if (port_state != old_state)
{
PRINTF("Port state: %x\r", port_state);
GPIO_PortToggle(GPIO, APP_BOARD_TEST_LED_PORT, 1u << APP_BOARD_TEST_LED_PIN);
old_state = port_state;
}
/* Delay 1000 ms */
SysTick_DelayTicks(1000U);
}
Pressing the button shows now difference but on occasion the breakpoint is hit and the green LED turns on. This is due to an occasional change in the port have an additional 18 show up in the pattern. bottom byte is stuck at 24.
I went through this exercise because I am unable to read the input ports on our target product board as well.
Ideas?? Can you recreate?