This example program shows how to configure PCA Module 4 as a
watchdog timer. In this example, the watchdog is configured to
overflow after 0xFF00 clock cycles.
This example describes how to use the ADC and DMA to transfer continuously
converted data from ADC to a data buffer.
The ADC is configured to converts continuously ADC channel14.
Each time an end of conversion occurs the DMA transfers, in circular mode, the
converted data from ADC1 DR register to the ADC_ConvertedValue variable.
The ADC1 clock is set to 14 MHz.
This example provides a description of how to use a DMA channel to transfer a
word data buffer from memory (Flash) to memory (RAM).
The dedicated DMA channel is configured to transfer once a time a 32 word data buffer
stored as constant in the Flash memory to another buffer in the RAM memory.
The received data are stored in the DST_Buffer.
The DMA channel transfer complete interrupt is enabled to generate an interrupt at
the end of the buffer transfer. As soon as the transfer is completed an interrupt is
generated and in the DMA channel interrupt routine the transfer complete interrupt
pending bit is cleared.
The data counter is stored before and after the transfer to show that all data has been
transfered.
TransferStatus gives the data transfer status where it is PASSED if transmitted and
received data are the same otherwise it is FAILED
Device pins that are not connected to a specific peripheral function are controlled by the
GPIO registers. Pins may be dynamically configured as inputs or outputs. Separate
registers allow setting or clearing any number of outputs simu
中文
ST32
基于(英蓓特)STM32V100的EXTI程序
This example shows how to configure an external interrupt line.
In this example, the EXTI line 9 is configured to generate an interrupt on each
falling edge. In the interrupt routine a led connected to PC.06 is toggled.
This led will be toggled due to the softawre interrupt generated on EXTI Line9
then at each falling edge.
The ISD51_Demo project for the MSC1200 shows how to use the ISD51
In-System-Debugger with flash breakpoints or hardware breakpoints.
By default, it is configured for flash breakpoints which allow you
to set real-time breakpoints in your software. Using Flash breakpoints
has also the benefit that no special handing for the shared interrupt
vector is required, since the hardware break registers of the MSC1200
are not used at all.
CAN1.c and CAN2.c are a simple example of configuring a CAN network to
transmit and receive data on a CAN network, and how to move information to
and from CAN RAM message objects. Each C8051F040-TB CAN node is configured
to send a message when it s P3.7 button is depressed/released, with a 0x11
to indicate the button is pushed, and 0x00 when released. Each node also has
a message object configured to receive messages. The C8051 tests the
received data and will turn on/off the target board s LED. When one target
is loaded with CAN2.c and the other is loaded with CAN1.c, one target
board s push-button will control the other target board s LED, establishing
a simple control link via the CAN bus and can be observed directly on the
target boards.
A few drivers for the Motorola C380 s celluar phone hardware with a simple test application. It s configured to build a binary that is to be uploaded at 0x03fd0000 and run at 0x03fd0010
The objective is to set up SPI communication between VTI Technologies digital pressure sensor
component and an MCU of an application device ATMEGA16L. In this code example:
?The MCU is configured
?SCP1000-D01 is initialized and configured
?The high resolution measurement mode is activated
?Temperature and pressure information is read always when the DRDY pin is in high state
Please refer to the document "SCP1000 Product Family Specification 8260800" for further
information on SCP1000 register addressing and SPI communication. This document applies to the
SCP1000-D01.