1. Boards
  2. TWR-KV31F120M

TWR-KV31F120M

NXP
TWR-KV31F120M
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
  • adc16_low_power_async_edma

    µVision AC6

    The ADC Low Power Async DMA demo application demonstrates the usage of the ADC and DMA peripheral while in a low power mode. Themicrocontroller is first set to very low power stop (VLPS) mode. Every 100 ms, low power timer trigger the ADC module convertvalue on ADC channel. After 16 times(1,6s) the DMA transfer finish interrupt wake up the CPU to process sampled data, print result touser and toggle LED.

    Download Pack
  • µVision AC6

    The adc16_polling example shows the simplest way to use ADC16 driver.In this example, user should indicate a channel to provide a voltage signal (can be controlled by user) as the ADC16'ssample input. When running the project, typing any key into debug console would trigger the conversion. The execution would check the conversion completed flag in loop until the flag is asserted, which means the conversion is completed. Then read the conversion result value and print it to debug console.Note, the default setting of initialization for the ADC converter is just an available configuration. User can changethe configuration structure's setting in application to fit the special requirement.The auto-calibration is not essential but strongly recommended. It can help to adjust the converter itself and improvethe ADC16's performance.

    Download Pack
  • µVision AC6

    The CMP polling Example shows the simplest way to use CMP driver and help user with a quick start.In this example, user should indicate an input channel to capture a voltage signal (can be controlled by user) as the CMP's positive channel input. On the negative side, the internal 6-bit DAC is used to generate the fixed voltage abouthalf value of reference voltage.When running the project, change the input voltage of user-defined channel, then the comparator's output would changebetween logic one and zero when the user's voltage crosses the internal DAC's value. The endless loop in main() functionwould detect the logic value of comparator's output, and change the LED. The LED would be turned on when the compareoutput is logic one, or turned off when zero.

    Download Pack
  • cmsis_dspi_edma_b2b_transfer_master

    µVision AC6

    The dspi_edma_b2b_transfer example shows how to use DSPI CMSIS driver in edma way:In this example , we need two boards, one board used as DSPI master and another board used as DSPI slave.The file 'dspi_edma_b2b_transfer_master.c' includes the DSPI master code.1. DSPI master send/received data to/from DSPI slave in edma .

    Download Pack
  • cmsis_i2c_edma_b2b_transfer_slave

    µVision AC6

    CMSIS-Driver defines generic peripheral driver interfaces for middleware making it reusable across a wide range of supported microcontroller devices. The API connects microcontroller peripherals with middleware that implements for example communication stacks, file systems, or graphic user interfaces. More information and usage methord please refer to http://www.keil.com/pack/doc/cmsis/Driver/html/index.html.The cmsis_i2c_edma_b2b_transfer_slave example shows how to use i2c driver as slave to do board to board transfer with a EDMA master:In this example, one i2c instance as slave and another i2c instance on the other board as master. Master sends a piece of data to slave, and receive a piece of data from slave. This example checks if the data received from slave is correct.

    Download Pack
  • cmsis_i2c_int_b2b_transfer_master

    µVision AC6

    CMSIS-Driver defines generic peripheral driver interfaces for middleware making it reusable across a wide range of supported microcontroller devices. The API connects microcontroller peripherals with middleware that implements for example communication stacks, file systems, or graphic user interfaces. More information and usage methord please refer to http://www.keil.com/pack/doc/cmsis/Driver/html/index.html.The i2c_interrupt_b2b_transfer_master example shows how to use CMSIS i2c driver as master to do board to board transfer with interrupt:In this example, one i2c instance as master and another i2c instance on the other board as slave. Master sends a piece of data to slave, and receive a piece of data from slave. This example checks if the data received from slave is correct.

    Download Pack
  • cmsis_i2c_read_accel_value_transfer

    µVision AC6

    CMSIS-Driver defines generic peripheral driver interfaces for middleware making it reusable across a wide range of supported microcontroller devices. The API connects microcontroller peripherals with middleware that implements for example communication stacks, file systems, or graphic user interfaces. More information and usage methord please refer to http://www.keil.com/pack/doc/cmsis/Driver/html/index.html.The cmsis_i2c_read_accel_value example shows how to use CMSIS I2C driver to communicate with an i2c device: 1. How to use the i2c driver to read a i2c device who_am_I register. 2. How to use the i2c driver to write/read the device registers.In this example, the values of three-axis accelerometer print to the serial terminal on PC throughthe virtual serial port on board.

    Download Pack
  • dspi_edma_b2b_transfer_slave

    µVision AC6

    The dspi_edma_b2b_transfer example shows how to use DSPI driver in edma way:In this example , we need two boards, one board used as DSPI master and another board used as DSPI slave.The file 'dspi_edma_b2b_transfer_slave.c' includes the DSPI slave code.1. DSPI master send/received data to/from DSPI slave in edma . (DSPI Slave using edma to receive/send the data)

    Download Pack
  • dspi_half_duplex_polling_slave

    µVision AC6

    The dspi_half_duplex_polling_transfer_slave example shows how to receive and transmit data to master board.Notice: The SPI slave of this example uses interrupt mode. The data transfer size(not buffer size) is twice ofthe master's transfer size. The first half of the transmission will receive data, and the second half will senddata back to master, so the address of the receive buffer is &rxDataPolling[64].In this example, one spi instance as slave and another spi instance on the other board as master. Master sends a piece of data to slave, and receive a piece of data from slave. This example checks if the data received from master is correct. And slave will print what it received.

    Download Pack
  • µVision AC6

    The EWM Example project is to demonstrate usage of the KSDK EWM driver.In the example, EWM counter is continuously refreshed until button is pressed.Once the button is pressed, EWM counter will expire and interrupt will be generated.After the first pressing, another interrupt can be triggered by pressing button again.

    Download Pack