CC2640r2f_4*4 Notes

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
insert image description here

Select the SKD version and compiler version to install XDCtool version Burner version
insert image description here
Called system-related macro definitions
insert image description here

The system starts from the main to
set the relevant chip size pin definition in the board and
insert image description here
call it to the system task in the main
insert image description here
Create the TIROS system task
insert image description here
We mainly write the code in the kernel task, that is, in this file
insert image description here
Initialization of the system task Initialization
system parameters include bluetooth The configuration, the initialization of the core peripherals
insert image description here
, and then enter the loop, which is similar to the structure of while (){}.
insert image description here
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.
insert image description here

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
insert image description here
initialization to create timer event configuration parameters
insert image description here
Add the event ID to the loop and add
insert image description here
the event triggering condition
insert image description here
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
insert image description here
Edit... you can re-select the file path
insert image description here

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

Guess you like

Origin blog.csdn.net/weixin_49048045/article/details/121958576