How can drivers and Framework middleware be used while programming in the same project to avoid hardware resource access conflicts?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How can drivers and Framework middleware be used while programming in the same project to avoid hardware resource access conflicts?

770 次查看
bjemt
Contributor III

Wireless UART(freeRTOS) is a BLE demo application in the SDK_2.2_FRDM-KW41Z, this demo use the FreeRTOS, Framework  middleware and BLE protocol components, these will use KW41Z of hardware resources, such as TPM timer, PIT timer, etc.I need to add the high speed ADC control during normal BLE and serial communication in this demo, and I need to directly operate the PIT and TPM timer in KW41Z through drivers (the timer in TimersManager is too slow).

My question is how do I avoid the PIT and TPM timers used in drivers that don't conflict with the middleware TimersManager and bluetooth protocol?Are there any middleware instructions?How can drivers and Framework middleware be used while programming in the same project to avoid hardware resource access conflicts?

标签 (2)
0 项奖励
2 回复数

579 次查看
gerardo_rodriguez
NXP Employee
NXP Employee

Hello limin Jia,

As long as you don't use the same timer instance as the framework you should have no problems. For example, the BLE wireless UART uses the TPM1, indicated by gStackTimerInstance_c defined in board.h.

The PIT timer is not used unless the timestamp service is used (gTimestamp_Enabled_d).

Regards,

Gerardo

0 项奖励

579 次查看
bjemt
Contributor III

Although I knew that FreeRTOS and these middleware were designed to be independent of hardware, but the program had to run on a hardware platform.FreeRTOS and these middleware have the user interface for developers, there is also a hardware interface to the hardware. How should I view these hardware interface definitions in SDK_2.2_FRDM-KW41Z?

0 项奖励