| поискавой системы для электроныых деталей |
|
UM2071 датащи(PDF) 43 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM2071 датащи(HTML) 43 Page - STMicroelectronics |
|
43 / 56 page ![]() UM2071 BlueNRG-1 peripheral driver examples DocID029370 Rev 3 43/56 The PUSH1 button (IO13) is configured to generate the interrupt event on both edges of the input signal. LED DL2 is toggled, the system becomes active and LED DL1 is toggled by the systick interrupt service routine every 500 ms. Once the device is in standby, there is no way to open a connection with the debug tool or download new code as the clocks are down and the system voltages are at their minimum values. It is necessary to wake-up the system first, which is why the IO9 (SDW clock signal) is wake-up event. In this case, any connection attempt from the debugger wakes up the system. 15.3 I²C examples In all of the following examples, I²C is configured in master mode and its clock frequency is set to 10 kHz. Master polling: I²C communication is controlled by polling the I²C status register content. This example involves a master board with Master_Polling firmware code and a slave board with Slave_Polling firmware. The Master board has a small command line interface through UART (USB-to-SERIAL must be connected to the PC), which you can use to read and change the LED status of the slave board. I²C is used to transfer the information and change the status of the LEDs on the slave board. Slave polling: I²C communication is controlled by polling the I²C status register content. This also involves a master and a slave board with respective Master_Polling and Slave_Polling firmware. The slave board receives read and change requests for the LEDs via I²C. Master sensor: I²C communication is controlled by polling of I²C status register content, interrupts or DMA (three different configurations). In this example, the environmental sensor LPS25HB is configured to provide output data at 1 Hz. The BlueNRG-1 polls the status register of the sensor and prints available pressure and temperature data via UART (USB-to-SERIAL must be connected to the PC). 15.4 Micro examples Hello world : example for the basic ‘BlueNRG-1 Hello World’ application. Connect the BlueNRG-1 platform to a PC USB port and open a specific PC tool/program (like Tera Term): the "Hello World: BlueNRG-1 is here!" message is displayed. Sleep test: this test provides an example for the following BlueNRG-1 sleep modes: SLEEPMODE_WAKETIMER places the BlueNRG-1 in deep sleep with the timer clock sources running. The wakeup sources are typing any character on the keyboard, the PUSH1 button or the sleep timer configured with a timeout of 5 s. The SLEEPMODE_NOTIMER places the BlurNRG-1 in deep sleep with the sleep timer clock sources turned off. The only wakeup sources are typing any character on the keyboard and the PUSH1 button. The demo supports some user commands: s: SLEEPMODE_NOTIMER - wake on UART/PUSH1 t: SLEEPMODE_WAKETIMER - wake on UART/timeout 5 s/PUSH1 l: Toggle led DL1 p : Print the ‘Hello World’ message r: Reset the BlueNRG-1 device ?: Display this help menu PUSH1: toggle LED DL1 |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |