Integrate frdmkw41z_rtos_examples_freertos_i2c into frdmkw41z_wireless_examples_thread_router_eligible_device_freertos

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate frdmkw41z_rtos_examples_freertos_i2c into frdmkw41z_wireless_examples_thread_router_eligible_device_freertos

397 Views
diegocomin
Contributor IV

Hi all,

I would like to make use of the freertos i2c example to integrate it into the thread router eligible device program. The objective is to make a i2c slave freertos task in order to receive the data from a RP in a task way instead of in an interrupt way. 

The questions are:

  • What task priority do I assign to the slave task in order have a good perform of the Router Eligible Device Program?
  • In what .c file of the "frdmkw41z_wireless_examples_thread_router_eligible_device_freertos" do I create the slave task and semaphore, where do I allocate the slave i2c callback and slave i2c task?

I show here some of the piece of code of the i2c freertos slave task prorities, tasks functions I need to allocate in the "frdmkw41z_wireless_examples_thread_router_eligible_device_freertos":

Task priority:

pastedImage_1.png

Task creation:

pastedImage_2.png

I2C Slave callback:

pastedImage_3.png

I2C Slave Task:

pastedImage_4.png

pastedImage_5.png

The difficulties I experience are that "frdmkw41z_wireless_examples_thread_router_eligible_device_freertos" router_eligible_device_app.c uses a queue of different subtask of the main program, so I do not know if I need to create general tasks to the i2c slave or tasks related to the app router_eligible_device program.

Regards,

 

Diego Comin

Labels (3)
0 Kudos
2 Replies

248 Views
diegocomin
Contributor IV

The slave callback function "i2c_slave_callback" remains to be an interrupt also with this i2c freeRTOS example?

0 Kudos

248 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Sorry for the late reply, by any chance, have you checked the implementation for the rest of the peripherals such as the temperature read and the buttons and GPIO interruptions? 

I believe if you use them as a guide your development will be easier as the only documentation available to achieve what you are trying to do it's the developer's application user guide where you can find more information regarding the task usage in the connectivity framework. 

Regards,

Estephania 

0 Kudos