This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Porting example about twi and HID keyboard

Hi, all.

I want data read from gyro sensor through i2c, and then send it through bluetooth equipment.(PC or iPhone and so on) My development environment is like below.

  • chip : nRf51822
  • example version : nRF_Example 10.0.0
  • pack version : check the attached file(pack_list.PNG)
  • Applied "RTT source" for debugging. have no uart port on the board. : devzone.nordicsemi.com/.../

At first, i did test like below.

  • [ble_app_hids_keyboard] : operation check completed.
  • [twi_sensor] : operation check completed
  • [twi_master_using_app_twi] operation check completed
  • [ble_app_hids_keyboard + twi_sensor] : operation check completed
  • [ble_app_hids_keyboard + twi_master_using_app_twi] : Error occured => I want this feature.

Source build is ok. But when excute the program, it does not working. I guess the problem is for "rtc_config()" function, but it is not sure.

main function is consist of like below: image description

Plseas kindly comment for resolving this issue.

Parents
  • I think your problem is similar to this case. Your application is already using the app_timer library and this library uses RTC1. Then you use nrf_drv_rtc to set up your own timer. This driver also use RTC1 and this will cause a conflict and unpredictable behaviour. You might already be aware that the Softdevice blocks the access to RTC0 so you can't set up the driver to use this timer either. Hence I think the best solution for you is to set up additional timers using the app_timer library as well. It is pretty easy, just look at the code in timers_init() and timers_start() in main.c and then create a new timer id variable and use the app_timer_create() and app_timer_create() functions.

  • Hi, Martin.

    Thank you very much!! Remove the timer about RTC and has been resolved by modifying "app_timer_create()" function. :)

Reply Children
No Data
Related