Re: [riot-devel] Minimal MCU clock speed for using it as a border-router.

2017-06-12 Thread Neo

Hi Kaspar,

I'm just searching for a very small device - and the device I have in my 
focus STM32L432 is running at it's nominal speed of 80MHz.


Regards,

Neo


On 12.06.2017 13:06, Kaspar Schleiser wrote:

Hi Neo,

On 06/12/2017 12:42 PM, Neo wrote:

Now my question - what is the minimum clock speed of such a controller
to be able to work as a border-router?

Are you asking because you're trying to save energy by running at an
intentionally low clock speed?

Any stm32 should be fast enough as 802.15.4 border router when run at
it's nominal frequency.

Actually, any tests proving that claim would be appreciated. ;)

Kaspar


___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] CPU clock on kinetis boards

2017-06-12 Thread Joakim Nohlgård
Hi,
I think the wisest choice is probably to switch to FEI mode first to use
the internal oscillator before booting a new image. That is the same mode
that the mcu comes up in after a hardware reset.

There are some relevant PRs open on GitHub for the Kinetis clocking:
https://github.com/RIOT-OS/RIOT/pull/6986 move k64f clock configuration to
board config
https://github.com/RIOT-OS/RIOT/pull/6978 MCG improvements

Best regards,
Joakim


On Jun 12, 2017 16:36, "Francisco Javier Acosta Padilla" <
francisco.aco...@inria.fr> wrote:

Hi again!

I just made it work, though is super strange why it works… I did:

static void cpu_clock_init(void)
{
/* setup system prescalers */
SIM->CLKDIV1 = (
   SIM_CLKDIV1_OUTDIV1(0) | /* Core/System clock
divider */
   SIM_CLKDIV1_OUTDIV2(1) | /* Bus clock divider */
   SIM_CLKDIV1_OUTDIV3(1) | /* FlexBus divider, not
used in Mulle */
   SIM_CLKDIV1_OUTDIV4(3)); /* Flash clock divider
*/

//SIM->CLKDIV1 = (uint32_t)SIM_CLKDIV1_60MHZ;

/* RMII RXCLK */
SIM->SCGC5 |= SIM_SCGC5_PORTA_MASK;
PORTA->PCR[18] &= ~(PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x07));

kinetis_mcg_set_mode(KINETIS_MCG_PEE);
}

And it works… any explanation? I took the values from the k60f code (mulle)
which seems to be completely different to the values contained in the
macro SIM_CLKDIV1_60MHZ (0, 0, 1, 2 values). Therefore, I have no idea on
which speed the clock is running.

BTW, with this code also works for a “normal” build, compiling and flashing
as usual.

I’ll look at the manual to see why we do that on RIOT (it’s not documented)
and maybe submit some PRs to both add doc and fix the setup if needed.

Cheers,

-- 
Francisco Javier Acosta Padilla
Research Engineer at INRIA Saclay
INFINE Team

On 12 June 2017 at 15:16:28, Francisco Javier Acosta Padilla (
francisco.aco...@inria.fr) wrote:

Hi RIOT devs!

I’m currently working on the RIOT port for MCUBoot[1], which takes the
frdm-k64f board as a reference board, and that’s also supported by RIOT and
other OSs using MCUBoot.

My first goal is to provide a “bootable” image compiled in RIOT and booted
by MCUBoot built for mynewt.

The work is going well so far, but I’m facing a problem which was also
present while coding the RIOT bootloader. Namely, the problem is that the
bootloader initialises the clock to a specific speed to run the booting
algorithm, which goal is to boot an OS in another flash position, an thus
the clock is initialised again leading to a clock crash.

Does anyone knows a “safe” way to reset the clock config to afterwards
configure it to the desired speed? Currently, as the code shows for the
k64f, the assumption is that the clock is in it’s default condition, which
is true when a reset is triggered, but now in this new context it’s not
true anymore.

I have seen some examples here [2] and here [3] which I tried without
success.

Thanks in advance!

Cheers,

-- 
Francisco Javier Acosta Padilla
Research Engineer at INRIA Saclay
INFINE Team

[1] https://github.com/runtimeco/mcuboot/
[2] https://github.com/apache/incubator-mynewt-core/blob/
master/hw/mcu/nxp/src/ext/sdk-2.0-frdm-k64f_b160321/devices/
MK64F12/drivers/fsl_clock.h#L897
[3] https://github.com/RIOT-OS/RIOT/blob/master/boards/mulle/board.c#L170


___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Help testing Kinetis dev boards

2017-06-12 Thread Joakim Nohlgård
I forgot to mention that you will need a development snapshot of openocd
for the kw41z.
See my kwxxz-support branch at
https://github.com/gebart/openocd/tree/pr/kwxxz-support?files=1

Best regards,
Joakim

On Jun 12, 2017 14:21, "Emmanuel Baccelli" 
wrote:

> Hi Joakim,
>
> FYI I just got hold of some kw41z boards.
> gnrc_networking compiles on both OS X and Ubuntu (Vagrant).
> Now I am trying to debug some trouble with jlink (can't flash the board
> yet).
>
> Cheers
>
> Emmanuel
>
> On Thu, Jun 8, 2017 at 1:09 PM, Emmanuel Baccelli <
> emmanuel.bacce...@inria.fr> wrote:
>
>> Hi Joakim
>>
>> just the other day, we ordered a couple frdm-kw41z at Inria, so we
>> should be able to test here soon.
>>
>> Cheers,
>>
>> Emmanuel
>>
>> On Thu, Jun 8, 2017 at 11:32 AM, Joakim Nohlgård <
>> joakim.nohlg...@eistec.se> wrote:
>>
>>> Dear developers,
>>> Eistec have begun adding support for more Kinetis Freedom development
>>> boards (frdm-k22f [1], frdm-kw41z [2]), to improve RIOT's hardware
>>> coverage.
>>>
>>> I would be thankful if anyone with access to these boards would test it
>>> and comment in the PRs with the results of their tests.
>>>
>>> I have opened a tracker issue [3] on GitHub for viewing the progress of
>>> this effort.
>>>
>>> [1]: https://github.com/RIOT-OS/RIOT/pull/6994
>>> [2]: https://github.com/RIOT-OS/RIOT/pull/6995
>>> [3]: https://github.com/RIOT-OS/RIOT/issues/7154
>>>
>>> Best regards,
>>> Joakim Nohlgård
>>> Eistec AB
>>>
>>> ___
>>> devel mailing list
>>> devel@riot-os.org
>>> https://lists.riot-os.org/mailman/listinfo/devel
>>>
>>>
>>
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] CPU clock on kinetis boards

2017-06-12 Thread Francisco Javier Acosta Padilla
Hi RIOT devs!

I’m currently working on the RIOT port for MCUBoot[1], which takes the 
frdm-k64f board as a reference board, and that’s also supported by RIOT and 
other OSs using MCUBoot.

My first goal is to provide a “bootable” image compiled in RIOT and booted by 
MCUBoot built for mynewt.

The work is going well so far, but I’m facing a problem which was also present 
while coding the RIOT bootloader. Namely, the problem is that the bootloader 
initialises the clock to a specific speed to run the booting algorithm, which 
goal is to boot an OS in another flash position, an thus the clock is 
initialised again leading to a clock crash.

Does anyone knows a “safe” way to reset the clock config to afterwards 
configure it to the desired speed? Currently, as the code shows for the k64f, 
the assumption is that the clock is in it’s default condition, which is true 
when a reset is triggered, but now in this new context it’s not true anymore.

I have seen some examples here [2] and here [3] which I tried without success.

Thanks in advance!

Cheers,

-- 
Francisco Javier Acosta Padilla
Research Engineer at INRIA Saclay
INFINE Team

[1] https://github.com/runtimeco/mcuboot/
[2] 
https://github.com/apache/incubator-mynewt-core/blob/master/hw/mcu/nxp/src/ext/sdk-2.0-frdm-k64f_b160321/devices/MK64F12/drivers/fsl_clock.h#L897
[3] https://github.com/RIOT-OS/RIOT/blob/master/boards/mulle/board.c#L170 ___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Help testing Kinetis dev boards

2017-06-12 Thread Emmanuel Baccelli
Hi Joakim,

FYI I just got hold of some kw41z boards.
gnrc_networking compiles on both OS X and Ubuntu (Vagrant).
Now I am trying to debug some trouble with jlink (can't flash the board
yet).

Cheers

Emmanuel

On Thu, Jun 8, 2017 at 1:09 PM, Emmanuel Baccelli <
emmanuel.bacce...@inria.fr> wrote:

> Hi Joakim
>
> just the other day, we ordered a couple frdm-kw41z at Inria, so we should
> be able to test here soon.
>
> Cheers,
>
> Emmanuel
>
> On Thu, Jun 8, 2017 at 11:32 AM, Joakim Nohlgård <
> joakim.nohlg...@eistec.se> wrote:
>
>> Dear developers,
>> Eistec have begun adding support for more Kinetis Freedom development
>> boards (frdm-k22f [1], frdm-kw41z [2]), to improve RIOT's hardware
>> coverage.
>>
>> I would be thankful if anyone with access to these boards would test it
>> and comment in the PRs with the results of their tests.
>>
>> I have opened a tracker issue [3] on GitHub for viewing the progress of
>> this effort.
>>
>> [1]: https://github.com/RIOT-OS/RIOT/pull/6994
>> [2]: https://github.com/RIOT-OS/RIOT/pull/6995
>> [3]: https://github.com/RIOT-OS/RIOT/issues/7154
>>
>> Best regards,
>> Joakim Nohlgård
>> Eistec AB
>>
>> ___
>> devel mailing list
>> devel@riot-os.org
>> https://lists.riot-os.org/mailman/listinfo/devel
>>
>>
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Minimal MCU clock speed for using it as a border-router.

2017-06-12 Thread Martine Lenders
Hi Neo,

regarding clock speed I'm not aware of any restrictions on the
`gnrc_border_router` example (though there are some on space, which most
STM32 MCUs should fulfill). It might get slower and depending on the
traffic it might get overwhelmed, but I think no one ever made any
experiments for that specifically.

Best regards,
Martine

2017-06-12 12:42 GMT+02:00 Neo :

> Dear RIOT-developers,
>
> up to now I have worked with a beaglebone as a 6LoWPAN border router.
>
> I want now to change to a microcontroller based system (STM32 family).
>
> Now my question - what is the minimum clock speed of such a controller to
> be able to work as a border-router?
>
> Thanks a lot!
>
> Best regards,
>
> Neo
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] Minimal MCU clock speed for using it as a border-router.

2017-06-12 Thread Neo

Dear RIOT-developers,

up to now I have worked with a beaglebone as a 6LoWPAN border router.

I want now to change to a microcontroller based system (STM32 family).

Now my question - what is the minimum clock speed of such a controller 
to be able to work as a border-router?


Thanks a lot!

Best regards,

Neo

___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] RIOT-OS in conjunction with Atollic-True-Studio

2017-06-12 Thread Neo

Hello RIOT developers,

is anyone out there who has experience in "how to get RIOT-OS to work 
inside of the Atollic-TrueStudio" environment?


Thanks!

Best regards,

Neo

___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel