A bluetooth chip owned by TI has the advantage of ultra-low power consumption, and the sleep can reach several ua levels
1. Development function:
1. Obtain the acceleration data of the target in real time, and forward it to the gateway through LORA to realize asset movement monitoring and management.
2. Through acceleration Mobile wake-up device, real-time acquisition of target vital sign data, and send it to listeners through Bluetooth broadcast, listener 1 to multiple broadcasters
Application: SPI/UART/watchdog/external interrupt/timer/ADC/
Note
1.TI Understanding of the RTOS programming framework
First find the minimum system engineering suitable for your project application among the 4 roles
Select the SKD version and compiler version to install XDCtool version Burner version
Called system-related macro definitions
The system starts from the main to
set the relevant chip size pin definition in the board and
call it to the system task in the main
Create the TIROS system task
We mainly write the code in the kernel task, that is, in this file
Initialization of the system task Initialization
system parameters include bluetooth The configuration, the initialization of the core peripherals
, and then enter the loop, which is similar to the structure of while (){}.
There are various small module unit timer events in the loop, and the loop execution
can put the operation modules that need to be applied in each small event. The execution
of the event requires messages, and the queue is full of messages to be executed.
2. What needs to be modified when customizing the timer event
First create the timer event id
in USER_ALL_EVENTS or your newly created ID
initialization to create timer event configuration parameters
Add the event ID to the loop and add
the event triggering condition
Util_startClock(&user_LedBlinkClock);//Indicates that the timer is started again after the timer is triggered Event, wait for the next trigger
. Note that in the use of Bluetooth, the time of the timer event should be less than 100ms, otherwise it is easy to interrupt the Bluetooth communication
3. Pay special attention to the file path, ccs is not very friendly
to view the path of the file
, right-click to select the last option
Edit... you can re-select the file path
4. Low power consumption and the use of small cores
Unresolved problems: OAD remote programming, the official website has related manuals, but it is based on the official development board, it is not easy to transplant, it will take some time
Corrections are welcome
. Reference:
Focus on referring to the cantaloupe routines. Following the basic routines will make it clearer.
CC2640r2 notes and source code
Bluetooth basics – several roles of Bluetooth