Hi,
I am devloping a Application for Low power device.Currently i am using NXP-Kw41z MCU.
I have some issue when configuring VLPR with Bluetooth on Bare metal.
1) If device will be configured in VLPR mode,Bluetooth Radio not working.I am using XCVR_init function for configuring Bluetooth of KW41z.I have already configured DCDC in Continuous mode.
2) How to configure wake up from deep sleep mode on Bluetooth event.
Kindly help us on above issue ASAP,Because we are in middle of development and stuck from 15 days.
Regards,
Deepak Kumar
Hi. I also have trouble like you and I think you should try to modify the 'x' value in the line "RSIM->CONTROL = ((RSIM->CONTROL & ~RSIM_CONTROL_RF_OSC_EN_MASK) | RSIM_CONTROL_RF_OSC_EN(x));". This line is in BOARD_RfOscInit(); function in clock_config.c source file. This function is used in the directory:source/ common/ApplMain.c/main_task()/hardware_init();/BOARD_BootClockRUN();/BOARD_RfOscInit(); You can find the purpose of changing this field in MK41/31... reference manual, page 1088/2425.
Deepak,
I believe VLPR is not supported when the radio is to be used. I believe this is a restriction imposed by the Connectivity Software due to the low CPU speed required when in VLPR.
Though, from what I understand of your latest post, you just want to make sure that cPWR_UsePowerDownMode = 1 in app_preinclude.h. That enables low power entry between BLE events.
Best regards,
Chris
Hi Chris,
I have enabled cPWR_UsePowerDownMode = 1 . I have Already Implemented my application as Heart Rate Sensor example code but not able to wake up on Ble Event . As per my Application requirement we need BLE event as a wake Source .
as i have seen In BLE Application Developer's Guide section 10.3.6 exit from Deep Sleep Mode 6 can be possible from BLE event .
1. How to Enter in Deep sleep Mode 6 Mode with BLE communication and wakeup on BLE Event ?
2. What is procedure to Configure BLE Event as wake-up Source from Deep Sleep Modes ?
Is it possible to wake-up from Deep Sleep Mode by using BLE Event , If there is any such type of events avilable in SDK 1.0.2 and SDK 2.2 Please Describe.
Thanks
Deepak Kumar
Hey Chris,
Any update.Have you seen my last post.Please let me know where i was doing wrong ??
Regards,
Deepak Kumar
Hello,
Sorry but I'm not fully getting your problem if you are already working with the Heart Rate Sensor and making your device go to sleep when setting it, the problem you are having it's that it is not waking up? Also, by BLE even, what do you mean? Which type or event are you referring to?
Regards,
Estephania
Hi,
Yes i am working with heart rate sensor example and MCU is going to sleep mode successfully,But my application requirement is when BlueTooth recived and data MCU will be wakeup.
Now my question is that is there any such type of BLE event available to wake up MCU when it is in sleep mode.
I describe my requirement more specific.
1.I need to go in sleep mode when data not recieved on BLE.
2.Wake up my MCU when recieved any data on BlueTooth.
So I am searching an event which wake up CPU from sleep mode when recived data on BlueTooth.
Regards,
Deepak Kumar
Hello,
I'm not sure which kind of message you are referring to, nonetheless, I believe you can check the BLE Application Developer's Guide.pdf, specifically the chapter 5.1 Client APIs (5.1.1.2 Notification and indication callbacks) that might be just what you are looking for.
regards,
Estephania
Hello,
Have you tried checking the available examples? I believe that the heart rate sensor example will be really helpful for you in your development.
Also, besides you use bare metal for some configurations, please keep in mind that you still will need to use an RTOS in order to develop some Bluetooth LE application, you can check in the BLE Application Developer's Guide for further details about this.
Regards
Hi,
I have already tested heart Rate Sensor example,but when we are enabling sleep mode in application bluetooth will be disconnected and never connect again until unless we are not pressing SW3 switch.
We have implemented on the basis of timeout but it will never comes from sleep mode in application.
Please let me know how to run Bluetooth in VLPR mode or Deep sleep mode.
When i am using application without Bluetooth it will go inside VLPR mode and works fine but when we have used Bluetooth in same application.
So how to configure bluetooth in VLPR mode.
Thnaks in Advance
Regards,
Deepak Kumar
Hello,
If I understand you completely, you implemented the code in bare metal in an application without the wireless connectivity framework and your code works correctly, but when using the same code in the Bluetooth LE examples it does not work correctly, could you please confirm if my understanding it's correct?
Are you sure you are not blocking the scheduler with something in your implementation?
Are you using the evaluation kit for this development? Are you considering that when the OSCCLK, the 32 MHz or 26 MHz crystal or external clock from EXTAL/XTAL, which serves as the Radio clock, is used as KW41 system clock, the RSIM_CONTROL[STOP_ACK_OVRD] bit should be set to avoid STOP/VLPS/LLSx/VLLSx mode entrance failure, could you please check those details ?
Hi,
Yes , your understanding is correct about the problem .
No, the Scheduler is not blocked anywhere throughout the application . yes i am using evaluation kit for this development . I am running my board in VLPR Mode for that i have Configured the DCDC in Continuous Mode. So in that mode the clock of 4 Mhz is configured as the the system clock . RSIM_CONTROL[STOP_ACK_OVRD] bit is set .
"Are you considering that when the OSCCLK, the 32 MHz or 26 MHz crystal or external clock from EXTAL/XTAL, which serves as the Radio clock, is used as KW41 system clock"
Can you please tell us more about how to Configure 32Mhz clock for BLE Radio in DCDC continuous Mode . so that the entry of MCU in VLPR mode is possible with working Bluetooth Module .
Thnaks in Advance
Regards,
Deepak Kumar
Hello,
Is there a specific reason why you want to use the VLPS mode? In the Bluetooth LE stack it is not as helpful as it is in thread for example as Bluetooth LE works using intervals. So it would seem that you might be complicating your implementation while using this mode instead of the VLLS3 mode.
Still, you can try using the SMC_SetPowerModeVlps for all the necessary setup, but still, in this case, the only "benefit" you might have when using the VLPS it's to have the radio in RX mode, but as I mentioned, Bluetooth LE works based on intervals, so this will not really be that useful.
I would strongly recommend you to use another of the VLLS modes in case you are using Bluetooth LE.
Regards,
Estephania
Hi Estephania,
I don't want to use VLPS mode i wanted to use VLPR mode .
According to your recommendation I have used VLLS3 mode that is deep sleep mode 1 in power library provided in SDK 2.2 .
In my Application the Development Board works for receiving the data via Bluetooth. the Auto connection and Disconnection of Bluetooth is also implemented in my Application . what i want to do is when my application is idle (not receiving any data on Bluetooth ) the board will go in low power mode for the power saving and wake-up on BLE radio event .
Please suggest me the appropriate condition to achieve this scenario .
Thanks
with Regards,
Deepak Kumar
Hello,
OK, if you want to enter a power saving mode and wake up with a Bluetooth LE event, you can't use the deep sleep mode, you need another of the VLLS modes or use another kind of timer as the heart rate sensor example
Regards,
Estephania