Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-11 Thread WangJiacheng
Thanks, Will. By updating the develop code, both 2-MHz and 4-MHz CPU frequency are working now. Best Regards, Jiacheng > 在 2017年1月11日,14:03,will sanfilippo 写道: > > Jiacheng: > > OK, there were some more issues with setting a non-1MHz clock. I tested this > with 1, 2 and

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread will sanfilippo
Jiacheng: OK, there were some more issues with setting a non-1MHz clock. I tested this with 1, 2 and 4 MHz using LightBlue (ios). I pushed the changes to develop so it should work now (one hopes). > On Jan 10, 2017, at 6:47 PM, WangJiacheng wrote: > > Thanks,

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread WangJiacheng
Hi Chris, My iOS is the latest 10.2, and the test devices are iPAD mini2, iPhone 6P, iPhone SE, both have the same disconnection issue (after several seconds). With "BLE_LL_CFG_FEAT_DATA_LEN_EXT: 0”, the disconnection issue is still there. Thanks, Jiacheng > 在 2017年1月11日,11:06,Christopher

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread Christopher Collins
Hi Jiacheng, On Wed, Jan 11, 2017 at 10:47:24AM +0800, WangJiacheng wrote: > More information about nimble stack with 2 MHz CPU frequency. nimble-bleprph > can be connected by LightBlue, but after several seconds, it is disconnected > with message “Disconnected Alert: The peripheral has

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread WangJiacheng
Thanks, Chris, It’s working now. More information about nimble stack with 2 MHz CPU frequency. nimble-bleprph can be connected by LightBlue, but after several seconds, it is disconnected with message “Disconnected Alert: The peripheral has disconnected.” With 4 MHz CPU frequency,

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread Christopher Collins
Hi Jiacheng, I think your version of newt is still slightly out of date. You can install the latest as follows: cd $GOPATH/src/mynewt.apache.org/newt/newt && git checkout develop&& git pull origin develop && go install

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread WangJiacheng
Sterling, Thanks. Yes, the newt is already updated. “newt version” has return "Apache Newt (incubating) version: 1.0.0-dev”. Best Regards, Jiacheng > 在 2017年1月11日,08:58,Sterling Hughes 写道: > > Hi Jiacheng, > > You need to update your newt tool along with the new

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread Sterling Hughes
Hi Jiacheng, You need to update your newt tool along with the new develop. Best, Sterling On 10 Jan 2017, at 16:46, WangJiacheng wrote: Hi, Will, I need more help, I have an error message when compile the target. I’m currently working on the release branch, so upgrade to dev branch by:

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-10 Thread WangJiacheng
Hi, Will, I need more help, I have an error message when compile the target. I’m currently working on the release branch, so upgrade to dev branch by: 1. change file project.yml from "vers: 0-latest” to "vers: 0-dev” 2. upgrade to dev branch “newt upgrade” Then compile the target by

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-09 Thread will sanfilippo
Hello: This issue should now be fixed in the latest development branch. Note that this is not working on the nrf51 platforms but since you were using nrf52 it should work. Let me know if you see any issues with it. > On Jan 8, 2017, at 6:20 PM, WangJiacheng wrote:

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-09 Thread will sanfilippo
You should be able to do exactly what you tried to do; that was one of the intents with os_cputime. Hopefully I will have an answer soon regarding why this does not work. Regarding timers: The nimble stack on the nrf52 currently uses Timer 0 for cputime (and thus for the controller BLE

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-08 Thread WangJiacheng
Hi, Will, Thanks a lot for your reply. Yes,the hardwear processor clock frequency of nRF52 (Cortex M4F) is 64 MHz and can not be changed. The reason of changing CLOCK_FREQ is that I want re-use the internal timing of mynewt already there with more accurate timing, by calling function

Re: How to change the CPU time frequency of mynewt and nimble stack

2017-01-08 Thread will sanfilippo
Those should be the only two parameters you need to configure. Must be a bug in the controller :-) I think it is worthwhile to point out that CLOCK_FREQ only changes the units of os cputime; it does not affect the speed at which the processor runs. At least, I could not see any other uses of

How to change the CPU time frequency of mynewt and nimble stack

2017-01-07 Thread WangJiacheng
Hi, The default CPU time frequency of Mynewt OS and Nimble stack is 1 MHz, I try to change the CPU time frequency to be 2 MHz, I modified the related 2 config files: configure file “hw/bsp/nrf52dk/syscfg.yml” as CLOCK_FREQ: description: 'TBD' value: 200 configure file