LPC Microcontrollers Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC Microcontrollers Knowledge Base

Discussions

Sort by:
For the CM33 of LPC55S6x family, the trust zone module is integrated, the memory space and peripherals are classified as security and non-security space. In order to generate interrupt in non-security mode, the NVIC module including the NVIC_ITNSx register must be initialized in security mode so that interrupt module can generate interrupt in non-security mode. The example demos that MRT0 module generates interrupt in non-security mode, the NVIC module is initialized at security mode, MRT0 is initialized at non-security mode. The project is based on MCUXpresso IDE ver11.1 tools, LPC55S69-EVK board and SDK_2.x_LPCXpresso55S69 SDK package version 2.11.1.
View full article
Test Elapsed time based on CTimer module   Sometimes, It is required to test the time which an api function takes when the function is executed, for example, some users want to test the flash erasing time and flash programming time. User can use GPIO to set/clear and use scope to test the GPIO timing to measure the time an api function takes, the method is very simple and straightforward but inaccurate. The document describes to configure CTimer as a 32bits  free-running counter, user can read the counter value before and after an api function and compute the counter value difference to get the time the api function takes. The CTimer of LPC54xxx family counts the APB bus clock, the APB bus clock Is driven by 12 MHz FRO, user can use the following code to measure the elapsed time. For example, we test the elaped time of  delayTimer(10000); function, we get the variable tPoint1, tPoint2. The actual time is (tPoint2- tPoint1)*(1/12000000). In the example, the tPoint2=110127, the tPoint1=53, the elapsed time is (110127-53)*(1/12000000)=9.172us. //the souce code focuses on LPC54xxx family uint32_t tPoint1,tPoint2,tPoint3,tDiff; void test(void) {     tPoint1=CTIMER_GetTimerCountValue(CTIMER2);     //simulate elapsed time     delayTimer(10000);     tPoint2=CTIMER_GetTimerCountValue(CTIMER2);     tDiff=tPoint2-tPoint1;       //simulate elapsed time     delayTimer(20000);     tPoint3=CTIMER_GetTimerCountValue(CTIMER2);     tDiff=tPoint3-tPoint2;      PRINTF("Time instand:tPoint1=%d, tPoint2=%d, tPoint3=%d \r\n",tPoint1,tPoint2,tPoint3); } Snippet of simple source code based on MCUXpresso tools and LPC54618 board developed by XiangJun Rong #include "fsl_ctimer.h" void test(void); void CTimerInit(void); void delayTimer(uint32_t elapsedTimer); uint32_t tPoint1,tPoint2,tPoint3,tDiff; void CTimerInit(void) {     ctimer_config_t config;     ctimer_match_config_t matchConfig;     /*CTimer use APB bus clock as Timer tick, set the APB bus clock as 12MHz internal FRO */      CLOCK_AttachClk(kFRO12M_to_ASYNC_APB);     CTIMER_GetDefaultConfig(&config);       CTIMER_Init(CTIMER2, &config);       matchConfig.enableCounterReset = true;     matchConfig.enableCounterStop = false;     matchConfig.matchValue = 0xFFFFFFFF;     matchConfig.outControl = kCTIMER_Output_NoAction;     matchConfig.outPinInitState = true;     matchConfig.enableInterrupt = false;     CTIMER_SetupMatch(CTIMER2, kCTIMER_Match_3, &matchConfig);     CTIMER_StartTimer(CTIMER2); }   void test(void) {     tPoint1=CTIMER_GetTimerCountValue(CTIMER2);     //simulate elapsed time     delayTimer(10000);     tPoint2=CTIMER_GetTimerCountValue(CTIMER2);     tDiff=tPoint2-tPoint1;       //simulate elapsed time     delayTimer(20000);     tPoint3=CTIMER_GetTimerCountValue(CTIMER2);     tDiff=tPoint3-tPoint2;      PRINTF("Time instand:tPoint1=%d, tPoint2=%d, tPoint3=%d \r\n",tPoint1,tPoint2,tPoint3); }   void delayTimer(uint32_t elapsedTimer) {     uint32_t i;     for(i=0; i<elapsedTimer; i++)     {         __asm("nop");     } }   int main(void) {    …………………………………………………………………………………………………..     PRINTF("Elapse time test start: \r\n");     CTimerInit();     test();     for(;;) {} ………………………………………… }  
View full article
This content was originally contributed to lpcware.com by Massimo Manca Example application for the "LPC4300 Getting started Kit" to learn and to use the multi processor communication and the newest peripherals of LPC43xx MCU family. System resources used and assignment to the cores: The Cortex-M4 core handles the application logic, manages the 4 touch keys and 4 leds (via the PCA9502 I2C 8 bit I7O expander), the lcd display and the real time clock. The Cortex-M0 core is dedicated to the printer management using the RS232 on board interface (in near future SCT and SGPIO will be used to interface a thermal printing head). The cores communicates using inter processor communication mechanisms minimizing the data passed from M4 to M0 and providing a simple security mechanism.
View full article
LPC4088 Closed Payment Loop Demo - Connecting the boards together In order to use the demo, the three boards (Embedded Artists Base Board, LPC4088 OEM module, CLRC663 Blueboard) must be connected together. Please follow below steps to accomplish this. 1) Place the LPC4088 OEM module in the baseboard. 2) Secure the 7" LCD board ontop of the baseboard using the supplied plastic spacers. Connect the two boards electrically together by using the supplied flatcable. 3) Connect the Blueboard to the base board. This is done by 8 wires and a USB-A to USB Mini-B cable. The USB connecting is only used for +5V and GND, not for data. For the 8 wire conenctions, please refer to the table below. EA Baseboard Blueboard Function USB UBS 5V supply / GND +3V3, [J4] 2 3V3 3.3V supply GPIO37, [J5] 23 P2.4 CLRC663 Interface Select0 GPIO40, [J3] 28 P2.5 CLRC663 Interface Select1 GPIO38, [J3] 27 P0.3 CLRC663 Reset I2C-SDA, [J5] 25 SDA SDA I2C-SCL, [J5] 26 SCL SCL - P2.0 CLRC663 I 2 C address, connect to GND - P2.1 CLRC663 I 2 C address, connect to GND Proceed to "Compiling the software & flashing the board".
View full article
#ISP‌ #bootrom‌ memremap‌
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-341477
View full article
Now that you've downloaded & unzipped your LPCXpresso54608 SDK, let's open IAR Embedded Workbench IDE. Note: You must have at least IAR Embedded Workbench version 7.80.3.12146 to use this board Once open, select File>Open>Workspace Navigate to the location where you unzipped your SDK files. Within this folder there are plenty of SDK based demos for you to explore our microcontroller.  We will use one of them to guide you through this tutorial, but definitely take time to try all of them! Select boards>lpcxpresso54608>demo_apps>touch_cursor>iar>touch_cursor Once the workspace is loaded, you will see the project files on the left.  Along the toolbar the first highlighted item is 'Build' select it. Once your console shows no errors you can select the 'Download and Debug' a few icons to the right of 'Build' Your debug session will start and will look like the following window.  Once it opens 'touch_cursor.c' and has a green arrow next to the main function you can select 'Go' After you have successfully flashed the board with this demo you will see the following on your board. This demo utilizes the touch interface on the screen to read where you are touching and updates the cursor position to the last known location.   Remember that other demos and sample code are provided in the root folder of the SDK download.   Be sure to explore these demos and reach out on the community if you need help!
View full article
Hello Community! This document is provided as a hands-on lab guide.  The intent of the lab is to demonstrate how to program the LPCXpresso804 board with the MCUXpresso IDE making use of the SDK examples and the PLU module drivers. The PLU configuration tool will be used to create a new schematic design that will be programmed to the PLU. Setup The following items need to be installed on your computer to complete the lab: Software: •    SDK_2.4.1_LPCXpresso804: -    Copy link into browser: https://mcuxpresso.nxp.com/en/select?device=LPCXpresso804 -    Select ‘MCUXpresso IDE’ or ‘All Toolchains’ in the Toolchain IDE drop-down -    Select ‘Download SDK’ •    MCUXpresso IDE version 10.2.1: -    Can be installed at following link: https://www.nxp.com/mcuxpresso/ide •    PLU configuration tool -    Can be installed at this link: https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-rt-series/i.mx-rt1060-crossover-processor-with-arm-cortex-m7-core:i.MX-RT1060?tab=Design_Tools_Tab   Hardware: •    LPCXpresso804 Development Board (OM40001): https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso804-for-the-lpc804-family-of-mcus:OM40001?tab=Design_Tools_Tab •    PLU Shield Board •    1 Micro USB cable Hope this guide is helpful! Any comments are welcome. Best Regards, Carlos Mendoza Technical Support Engineer
View full article
[中文翻译版] 见附件 原文链接: https://community.nxp.com/docs/DOC-342406
View full article
This content was originally contributed to lpcware.com by Cam Thompson This project is a simple data logging example that takes readings from various sensors, and log the information to a web page. The Cortex-M4 is used to collect and process sample data, and the Cortex-M0 is used to run a web server for supplying data to web clients. This allows data to be viewed on any web browser, including portable devices such as smart phones and tablets. The web data logging example was implemented using the Hitex LPC4300 evaluation board, which has all the necessary components. The LPC43xx has a built-in ethernet controller accessible by either core, and the Hitex evaluation board provides the physical layer. An on-board 128x32 pixel Chip-on-Glass (COG) LCD display, four touch sensors, and several LEDs are used for implementing a simple user interface. The LPC43xx contains a Real-Time Clock (RTC) which is used to record the date and time of data samples.
View full article
This is a quick introduction that shows how to interface a popular GPS module to the LPC845 Breakout Board using the UART drivers from the MCUXpresso SDK. This example reads and parses GPS data from the module when the user button is pressed and outputs the information to a host computer console via the board's VCOM interface.    UART Protocol The UART function uses two TPU channels to provide a 2-wire (TxD and RxD) asynchronous serial interface. One TPU channel is configured to function as the serial transmitter (TxD), and another TPU channel is configured to function as a serial receiver (RxD).    Adafruit Flora Wearable GPS The module used for this example is built around the MTK3339 chipset, a no-nonsense, high-quality GPS module that can track up to 22 satellites on 66 channels, has an excellent high-sensitivity receiver. It can do up to 10 location updates a second for high speed, high sensitivity logging or tracking. Power usage is very low, only 20 mA during navigation. Adafruit took this module and mounted it on one of their super-compact Flora boards, which are very easy to connect up to the LPC845 Breakout:     Figure 1. Flora Wearable GPS.   GPS Module Example NXP provides example packages that include projects to use the principal's peripherals that the board include: ADC, I2C, PWM, USART, Captouch, and SPI.   What we need: LPC845 Breakout Board MCUXpresso IDE V10.3.0 SDK_2.5.0_LPC845 NXP example packages Adafruit Flora Wearable GPS Micro USB cable   Once downloaded, we import the library project into the workspace using the ''Import project(s) from file system... from the Quickstart panel in MCUXpresso IDE:     Figure 2. Import projects   Then browse the examples packages archive file:     Figure 3. Select Example package.   Press next, and see that are a selection of projects to import, in this case, only keep select the LPC845_BoB_GPS how it looks in the picture below:     Figure 4. Select GPS project   Connections Now, with the project already in the workspace is time to set up the connection between the LPC845 Breakout board and the GPS module, as shown in the table below:     Table 1. LPC845 to GPS module.   The Flora module has the signals clearly printed on their silkscreen which really helps .     Figure 5. LPC845 Breakout Board to GPS module connections.   Once the connections are made, its time to build and run the example code, use the build and debug button inside the IDE. Now open a terminal program and connect to the COM port the board enumerated as. Configure the terminal with these settings:  115200 baud rate.   No parity.  8 data bits  1 stop bit   Place the GPS module outside. Once the GPS has located the satellite data, the red LED on the GPS will stop blinking. If you see the LED blinking once a second, it does not yet have a fix! It can take many minutes to get a fix if the module sees any satellites immediately. Once it has a fix, press the user button (K1) to display the GPS data in the serial monitor, which includes the current date and time in UTC. It will also give you your latitude, longitude and approximate altitude with the Serial monitor. Figure 6. GPS Print Out.
View full article
Hello I have worked on Eclipse for developing applications. I am using NXP's  LPC1769 chip. I have made a documentation on setting up an Eclipse environment.Initially I worked on two basic projects i.e. GPIO toggling and Seven segment display. For running any application ,environment setup is is very important. In this documentation, I have mentioned some links and videos which worked for me. For setting up eclipse environment you need to set up tool chains and paths properly otherwise it will show path errors while compiling any project. Hope it would be helpful!
View full article
Introduction FEZ is an open source development platform for beginners. Powered by an ARM processor (LPC2388) and driven by Microsoft's .NET Micro Framework, FEZ is a doorway to the embedded world. From the ground up, we designed FEZ to be extremely easy to learn. From the boards to the brochures, we made sure to explain everything on your journey. Programming is made easy by using Microsoft's Visual Studio and C#. Enabling those unfamiliar with the embedded world to program without having any prior knowledge. To further assist exploration, we've created an eBook providing extensive details and code examples. Not only is this eBook free, the SDK and IDE are also completely free. This overall low-cost starting point opens the opportunity to learn embedded devices to everyone. Key Features Based on Microsoft's .NET Micro Framework Runs on 72MHz NXP ARM processors (LPC2387 and LPC2388) Supports runtime debugging (breakpoints, variable inspection, stepping, etc.) Use Visual Studio 2008 C# Express Edition for development Advanced capabilities like FAT, USB device, and USB host Easily upgrades to hardware such as Embedded Master Open source hardware design files Use existing shields and holder boards Based on the USBizi chipset (ideal for commercial use) FEZ Mini pin-out compatible with BS2 FEZ Domino pin-out compatible with Arduino Developent Environment FEZ development is done using Visual Studio 2008 C# Express Edition. You're now able to use the same powerful IDE used by PC developers. The benefits of managed C# programming include reducing programming errors significantly and automatically managing system resources. From the code IntelliSense and included peripheral libraries to deploying and debugging applications. These tools are not only the most advanced, they are all free. As you type, IntelliSense gives you the appropriate methods and properties. Stepping through the code on-device allows you to debug problems efficiently. Hardware FEZ comes in two models: FEZ Domino and FEZ Mini. Both include libraries that contain the FAT file system, threading, UART, SPI, I 2 C, GPIO, PWM, ADC, DAC, and many more. Two kits are also available: the starter kit and the robot kit. We also offer a multitude of peripherals for these boards such as Bluetooth, LEDs, buttons, light sensors, and thermometers, to name a few. FEZ Domino FEZ Mini Software Microsoft's .NET Micro Framework is a lightweight implementation of the .NET Framework. It focuses on the specific requirements of resource-constrained embedded systems. Supporting development in C# and debugging on an emulator or the device, both using Visual Studio. The .NET Micro Framework is also open source, released under the Apache 2.0 license and completely free. Developers already experienced with .NET and Visual Studio can take advantage of their skills immediately, reducing the learning curve. The actual C# application development process is completely shielded from the low-level design details of the hardware platform. Combining the benefits with off-the-shelf, low-cost, network-enabled embedded systems creates a rapid product development solution. More Information FEZ Partners Links TinyCLR Brochure TinyCLR Ebook Reference TinyCLR Tutorial Microsoft .NET Micro Framework Blog Wikipedia Fez (hat
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2019/02/26/lpc55xx-multicore-applications-with-mcuxpresso-ide
View full article
This content was originally contributed to lpcware.com by Richard Man This project demonstrates how easy it is to port a commonly used open source FatFS code to the LPC4350 using SDIO and built-in SDMMC support. In the competitive embedded microcontroller market, one way a silicon vendor can differentiate its offerings from the rest is by integrating higher-function peripherals onchip. As such, it is no longer unusual to find chips with built-in LCD, USB, CAN, Ethernet, and in some instances, even hardware support for the SD/MMC memory devices. Such is the case with the NXP LPC4350. With two ARM Cortex cores and many other features, it also sports SD/MMC hardware. Without dedicated SD/MMC support, the firmware typically must use bit banging code which is timing sensitive and adds to the complexity of the code.
View full article