Arm Keil MDK v6 Essential and Professional editions are now available to buy as monthly or annual subscriptions from our Developer Tools store. Visit the store to get access to the tools suite today!

  1. Boards
  2. LPCXpresso54618

LPCXpresso54618

NXP
LPCXpresso54618
VSCode with the Arm Keil Studio extension

Accelerate your application development with example projects

Import your chosen project to Keil Studio for VS Code or Keil Studio Cloud, or download for use in Keil uVision.

Learn more about Keil tools
  • µVision AC6

    The lpc_adc_dma example shows how to use LPC ADC driver with DMA.In this example, the internal temperature sensor is used to created the input analog signal. When user type in any key from the keyboard, the software trigger API is called to start the conversion. When the ADC conversion is completed, it would trigger the DMA to move the ADC conversion result from ADC conversion data register to user indicated memory. Then the main loop waits for the transfer to be done and print the result to terminal.Project Information1.what are ADC conversion sequences? A conversion sequence is a single pass through a series of A/D conversions performed on a selected set of A/D channels. Software can set-up two independent conversion sequences, either of which can be triggered by software or by a transition on one of the hardware triggers. Each sequence can be triggered by a different hardware trigger. One of these conversion sequences is referred to as the A sequence and the other as the B sequence. It is not necessary to employ both sequences. An optional single-step mode allows advancing through the channels of a sequence one at a time on each successive occurrence of a trigger. The user can select whether a trigger on the B sequence can interrupt an already-in-progress A sequence. The B sequence, however, can never be interrupted by an A trigger. 2. How to use software-triggered conversion? There are two ways that software can trigger a conversion sequence: 1. Start Bit: The first way to software-trigger an sequence is by setting the START bit in the corresponding SEQn_CTRL register. The response to this is identical to occurrence of a hardware trigger on that sequence. Specifically, one cycle of conversions through that conversion sequence will be immediately triggered except as indicated above. (In this example, we use this way.) 2. Burst Mode: The other way to initiate conversions is to set the BURST bit in the SEQn_CTRL register. As long as this bit is 1 the designated conversion sequence will be continuously and repetitively cycled through. Any new software or hardware trigger on this sequence will be ignored. 3. How to use DMA to work with ADC? The sequence-A or sequence-B conversion/sequence-complete interrupts may also be used to generate a DMA trigger. To trigger a DMA transfer, the same conditions must be met as the conditions for generating an interrupt. Remark: If the DMA is used, the ADC interrupt must be disabled in the NVIC. Program Flow1.This example demonstrates how to configure the A sequences with interrupt, assigning one channel with software trigger, you can configure channel via "DEMO_ADC_SAMPLE_CHANNEL_NUMBER". 2.Before configuration of the ADC begins, the ADC is put through a self-calibration cycle. 3.Configure the DMA and DMAMUX to work with ADC sequences.4.Enable the Conversion-Complete or Sequence-Complete DMA for sequences A. 5.After ADC channels are assigned to each of the sequences, if the user enters any key via terminal, software trigger will start. 6.When the conversion completes, the DMA would be requested.7.When the DMA transfer completes, DMA will trigger a interrupt. ISR would set the "bDmaTransferDone" to 'true'. Then main function will print conversion result to terminal.

    Download Pack
  • mcan_interrupt_transfer

    µVision AC6

    The mcan_interrupt example shows how to use MCAN driver in none-blocking interrupt way:In this example, 2 boards are connected through CAN bus. Endpoint A(board A) send a CAN Message toEndpoint B(board B) when users press space key in terminal. Endpoint B receives the message, printsthe message content to terminal and echoes back the message. Endpoint A will increase the receivedmessage and wait for the next transmission the users initiate.

    Download Pack
  • µVision AC6

    The mcan_loopback example shows how to use the loopback test mode to debug your CAN Bus design:To demonstrate this example, only one board is needed. The example will config Tx Buffer to sendand Rx Fifo to receive. After that, the example will send a CAN Message throuth internal loopbackinterconnect and print out the Message payload to the terminal.

    Download Pack
  • µVision AC6

    The MRT project is a simple demonstration program of the SDK MRT driver. It sets up the MRThardware block to trigger a periodic interrupt after every 250 milliseconds. When the PIT interrupt is triggereda message a printed on the UART terminal and an LED is toggled on the board.

    Download Pack
  • pint_pattern_match

    µVision AC6

    This example shows how to use SDK drivers to use the Pin interrupt & pattern match peripheral.

    Download Pack
  • pint_pin_interrupt

    µVision AC6

    This example shows how to use SDK drivers to use the Pin interrupt & pattern match peripheral.

    Download Pack
  • power_manager_lpc

    µVision AC6

    The power_manager_lpc application shows the usage of normal power mode control APIs for entering the three kinds of low power mode: Sleep mode, Deep Sleep mode and Sleep Power Down mode. When the application runs to each low power mode, the device would cut off the power for specific modules to save energy. The device can be also waken up by prepared wakeup source from external event. Tips: This demo is to show how the various power mode can switch to each other. However, in actual low power use case, to save energy and reduce the consumption even more, many things can be done including: - Disable the clock for unnecessary module during low power mode. That means, programmer can disable the clocks before entering the low power mode and re-enable them after exiting the low power mode when necessary. - Disable the function for unnecessary part of a module when other part would keep working in low power mode. At the most time, more powerful function means more power consumption. For example, disable the digital function for the unnecessary pin mux, and so on. - Set the proper pin state (direction and logic level) according to the actual application hardware. Otherwise, the pin cirrent would be activied unexpectedly waste some energy. - Other low power consideration based on the actual application hardware. - In order to meet typedef power consumption of DateSheet manual, Please configure MCU under the following conditions. 鈥?Configure all pins as GPIO with pull-up resistor disabled in the IOCON block. 鈥?Configure GPIO pins as outputs using the GPIO DIR register. 鈥?Write 1 to the GPIO CLR register to drive the outputs LOW. 鈥?All peripherals disabled.

    Download Pack
  • µVision AC6

    The RIT project is a simple demonstration program of the SDK RIT driver. It sets up the RIThardware block to trigger a periodic interrupt at 1 second period interval to toggel a specifiedLED on board.

    Download Pack
  • µVision AC6

    The RNG example project is a demonstration program that uses the KSDK software to generate random numbersand prints them to the terminal. 32 32-bit numbers are read and skipped per one 32-bit number read and used.This is to get a better entropy as suggested by user manual.

    Download Pack
  • µVision AC6

    The example shows how to use USBD ROM stack to create and USB AUDIO class device. This device supports 2 channel audio in (MIC/LINE_IN) and 2 channel audio out (SPEAKERS/HEADPHONE).

    Download Pack