I am a beginner in nxp and need to make a baremetal CMSIS project. I am using LPC55S28JBD100 controller. I don't know how to get started. PLease share some projects and links which help me to learn more on this.
Solved! Go to Solution.
Hello @smishra125,
I've already answered you in your other post: Trying to build LED blinking project in baremetal - NXP Community.
Regards, Raul.
@danielholala @RaRo I got that and made the project. Also one thing, I want to toggle the LED without GPIO_PORTToggle(). I prepared the code but don't know how to clear the port. I tried to use gpio->CLR[1] = (1<<LED_RED); but it failed.
Following is the code snippet.
void delay_ms(uint32_t count)
{
for(uint32_t i = 0 ; i < count*1000 ; i++);
}
int main(void) {
GPIO_Type *gpio = GPIO;
// TODO: insert code here
//
SYSCON_Type *syscon = SYSCON;
syscon->AHBCLKCTRL.AHBCLKCTRL0 |= (1<<15);//ENABLE GPIO1 CLOCK
syscon->AHBCLKCTRL.AHBCLKCTRL0 |= (1<<13);//ENABLE IOCON CLOCK
gpio->SET[1] = 0xff;//enable gpio 1 for reading/writing
gpio->DIR[1] = 0xff;// make gpio as output
// Force the counter to be placed into memory
volatile static int i = 0 ;
// Enter an infinite loop, just incrementing a counter
while(1) {
i++ ;
gpio->B[1][LED_RED] = (1<<LED_RED);
delay_ms(1000);
gpio->B[1][LED_GREEN] = (1<<LED_GREEN);
delay_ms(1000);
gpio->B[1][LED_BLUE] = (1<<LED_BLUE);
delay_ms(1000);
}
return 0 ;
}
Hello @smishra125,
I've already answered you in your other post: Trying to build LED blinking project in baremetal - NXP Community.
Regards, Raul.
Hello @smishra125,
First, download an IDE compatible for creating your project, as MCUXpresso IDE
Second, in MCUXpresso IDE (as @danielholala points out) there is a bunch of examples you could try related with CMSIS, but first you need to download the SDK for your microcontroller; there are two ways:
You can access the examples in MCUXpresso IDE as follows:
Third, if you are searching for more information, I recommend you take a look to the following links: Overview CMSIS, and CMSIS: Cortex Microcontroller Software Interface Standard.
Regards, Raul
Have you installed the SDK for your controller? If so, then import an SDK example and have a look at the source code. There are CMSIS driver examples for I2C, SPI and USART interfaces.