Re: [riot-devel] Is samr21-xpro SPI working

2016-07-08 Thread Kaspar Schleiser
Hey,

On 07/08/2016 08:16 PM, Kees Bakker wrote:
> It drives me nuts. Any hint is greatly appreciated.

Do you have a logic analyzer?

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


Re: [riot-devel] Is samr21-xpro SPI working

2016-07-08 Thread Kees Bakker

This very same setup works perfectly with Arduino.
It is a SAMD21 on a Autonomo (very much like Arduine Zero).
It has a 16Mb "serial flash" chip on it.

I started with the code from cpu/samd21 that was developed for
the samr21-xpro board.

The "only" thing I had to change is the pins for the SPI. And with the
pins I also had to change the SERCOM, the PADs and the pin MUX.
And yes, I checked the SS pin (and all other pins) over and over.

So far I was able to get UART and I2C working. But for more than a
week now I am stuck at SPI. I use the tests/periph_spi test program.

�main(): This is RIOT! (Version: 
2016.07-devel-336-g38dc1-rapper-add-sodaq-autonomo)


RIOT low-level SPI driver test
This application enables you to test a platforms SPI driver implementation.
Enter 'help' to get started

> �main(): This is RIOT! (Version: 
2016.07-devel-336-g38dc1-rapper-add-sodaq-autonomo)


RIOT low-level SPI driver test
This application enables you to test a platforms SPI driver implementation.
Enter 'help' to get started

> help
Command  Description
---
init_master  Initialize node as SPI master
init_slave   Initialize node as SPI slave
send Transfer string to slave (only in master mode)
print_rx Print the received string (only in slave mode)
reboot   Reboot the node
>
> init_master 0 0 23
SPI_0 successfully initialized as master, cs: GPIO_1090536471, mode: 0, 
speed: 2

>
> send
Transfered 5 bytes:
MOSI   01234
 0x9f 0x00 0x00 0x00 0x00
  ??   ??   ??   ??   ??

MISO   01234
 0xff 0xff 0xff 0xff 0xff
  ??   ??   ??   ??   ??

It drives me nuts. Any hint is greatly appreciated.
-- Kees

On 08-07-16 19:03, Baptiste Clenet wrote:

Autonomo  uses samd21 CPU? You use same driver as samr21?
What's your problem?
Are you sure your SPI Slave chip is working correctly?

2016-07-07 21:01 GMT+02:00 Kees Bakker :

Ah, _now_ it makes sense. :-) Thanks for letting me know.

That leaves me with my own SPI problem. On my Autonomo I can't get
it to work. It is working with Arduino, but with RIOT (under construction)
it's
not :-(



On 06-07-16 22:53, Baptiste Clenet wrote:

Yes I know, I changed it to make it work :)  (SPI1)

2016-07-06 22:48 GMT+02:00 Kees Bakker :

OK thanks. However, your remark about SPI1 puzzles me a bit, because it
was
using
an incorrect PAD setting. PR #5609 fixed today.


On 05-07-16 23:21, Baptiste Clenet wrote:

I can confirm that it works properly.
SPI is used to communicate with the transceiver on samr21-xpro and
communication works so SPI works, I used SPI1 also with no problem

2016-07-05 21:50 GMT+02:00 Kees Bakker :

Hey,

Can someone confirm that SPI is working on the samr21-xpro board?

I'm trying to make SPI work on my Autonomo board, but I haven't
succeeded yet. FYI, I'm also reorganizing the code so there are a lot
of parameters that can be of influence. I can't use the current code
because the pins and the SERCOMs are different.

It would help me to know that it works on samr21-xpro.

--
Kees Bakker
Founder
SODAQ
M. 0031617737165
www.sodaq.com

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




--
Kees Bakker
Founder
SODAQ
M. 0031617737165
www.sodaq.com

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





--
Kees Bakker
Founder
SODAQ
M. 0031617737165
www.sodaq.com

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






--
Kees Bakker
Founder
SODAQ
M. 0031617737165
www.sodaq.com

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


Re: [riot-devel] Is samr21-xpro SPI working

2016-07-08 Thread Baptiste Clenet
Autonomo  uses samd21 CPU? You use same driver as samr21?
What's your problem?
Are you sure your SPI Slave chip is working correctly?

2016-07-07 21:01 GMT+02:00 Kees Bakker :
> Ah, _now_ it makes sense. :-) Thanks for letting me know.
>
> That leaves me with my own SPI problem. On my Autonomo I can't get
> it to work. It is working with Arduino, but with RIOT (under construction)
> it's
> not :-(
>
>
>
> On 06-07-16 22:53, Baptiste Clenet wrote:
>>
>> Yes I know, I changed it to make it work :)  (SPI1)
>>
>> 2016-07-06 22:48 GMT+02:00 Kees Bakker :
>>>
>>> OK thanks. However, your remark about SPI1 puzzles me a bit, because it
>>> was
>>> using
>>> an incorrect PAD setting. PR #5609 fixed today.
>>>
>>>
>>> On 05-07-16 23:21, Baptiste Clenet wrote:

 I can confirm that it works properly.
 SPI is used to communicate with the transceiver on samr21-xpro and
 communication works so SPI works, I used SPI1 also with no problem

 2016-07-05 21:50 GMT+02:00 Kees Bakker :
>
> Hey,
>
> Can someone confirm that SPI is working on the samr21-xpro board?
>
> I'm trying to make SPI work on my Autonomo board, but I haven't
> succeeded yet. FYI, I'm also reorganizing the code so there are a lot
> of parameters that can be of influence. I can't use the current code
> because the pins and the SERCOMs are different.
>
> It would help me to know that it works on samr21-xpro.
>
> --
> Kees Bakker
> Founder
> SODAQ
> M. 0031617737165
> www.sodaq.com
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel



>>>
>>> --
>>> Kees Bakker
>>> Founder
>>> SODAQ
>>> M. 0031617737165
>>> www.sodaq.com
>>>
>>> ___
>>> devel mailing list
>>> devel@riot-os.org
>>> https://lists.riot-os.org/mailman/listinfo/devel
>>
>>
>>
>
>
> --
> Kees Bakker
> Founder
> SODAQ
> M. 0031617737165
> www.sodaq.com
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel



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


Re: [riot-devel] Trial to enhance the porting guide

2016-07-08 Thread Peter Kietzmann

Hi Bernhard,

it's been a while :-). Nice to see you are on RIOT again! I agree that 
the wiki might need some enhancements here and there. It is editable for 
anyone and I'd be happy if you could fill some gaps when porting your 
board. I'll try to answer your questions


In contrast to other OSes we did not want to have several timers for 
different use cases. In RIOT you'll find two timer APIs: (i) 
periph/timer and (ii) xtimer. (i) was intended to provide the slimmest 
possible abstraction on top of real hardware timers. (ii) is a unified 
API which makes use of the periph timer. It takes values in seconds (not 
in ticks) and converges between both, it handles intervals longer than 
overflow periods, it is able to multiplex a single hardware timer and in 
the end it "hides" the complexity of multiple timers on diverse hardware.


Ludwig already pointed you to the scheduler doxy. In short there are the 
following "events" that cause a context switch (afaik):

- external interrupts jump into the ISR (obviosly)
- a higher prioritized task/thread occurrs (e.g. in ISR context or so)
(- a higher prioritized is woken up manually)
- manually yielding a thread
- ending a thread or letting it sleep

That's (nearly) all I know.

Regards
Peter

Am 08.07.2016 um 00:16 schrieb Bernhard Nägele:

Hello RIOT developers,
I have now made some experience with RIOT-OS and I'm working on a port
to the STM32L073.
My problem is sometimes to understand the relationship between the OS
parts.
The source code documentation via Doxygen is nice, but not sufficient to
get a real understanding
about the architecture of RIOT and I'm a unhappy to find out how some
parts are working
by "surfing" through the source code.  Therefore I will try to enhance
the porting guide and therefore
I will ask you (maybe) some silly questions.but I think the
questions I will ask are somehow unclear to
a RIOT newbie.
The first question I have is about the xtimer. What is the "official"
purpose of this timer. What should be realised via the xtimer and what
should be realised by the other timers.
The second question - which event triggers the thread context switching?
Scheduled by timers?

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


--
Peter Kietzmann

Hamburg University of Applied Sciences
Dept. Informatik, Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49-40-42875-8426
Web: http://www.haw-hamburg.de/inet
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel