Author Topic: Atmel Lightweight Mesh and I2C slave  (Read 1962 times)

0 Members and 1 Guest are viewing this topic.

Offline piotrvvTopic starter

  • Newbie
  • Posts: 4
  • Country: pl
Atmel Lightweight Mesh and I2C slave
« on: November 23, 2016, 10:07:29 pm »
Hello.

 I try to develope LwM coordinator with I2C slave. Seperate I2C and stack works fine. But when I set it in one time, master always reads bad data. Hardware: master - Raspberry PI (100kHz), slave- SAMR21Xplained, software: WSNDEMO app from atmel studio + i2c slave (callback mode). I cut usart printing, but it doesn't help at all. I2C frame has 16B length. Is it possible to build stable project? Will service stack allow i2c slave work correctly?

Best regards,
Piotrvv
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Atmel Lightweight Mesh and I2C slave
« Reply #1 on: November 23, 2016, 11:18:24 pm »
I see no reason for it not to work technically. I don't know what is wrong with ASF drivers, I recommend using standalone LwMesh and writing bare metal I2C driver.
Alex
 

Offline piotrvvTopic starter

  • Newbie
  • Posts: 4
  • Country: pl
Re: Atmel Lightweight Mesh and I2C slave
« Reply #2 on: December 06, 2016, 10:46:04 am »
New ASF project works (it was new ASF version meantime), but I had to slow down SCK to 20kHz. I know, it's pretty slow, but enough for me.
Best regards,
Piotrvv
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Atmel Lightweight Mesh and I2C slave
« Reply #3 on: December 06, 2016, 05:27:38 pm »
This is really weird if you have to do things like this to make your program work. I would investigate and figure this out before moving on, things may break later on in a way that is much harder to debug.
Alex
 

Offline piotrvvTopic starter

  • Newbie
  • Posts: 4
  • Country: pl
Re: Atmel Lightweight Mesh and I2C slave
« Reply #4 on: December 07, 2016, 11:01:17 pm »
I atacched my simple project. Master can read 16B from four internal adresses: 11-14. Slave works fine on 100kHz without stack.

https://drive.google.com/file/d/0B8NjEbzmcZQvaWQ3U25kdVNMZHc/view?usp=sharing

Regards,
Piotrvv
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11236
  • Country: us
    • Personal site
Re: Atmel Lightweight Mesh and I2C slave
« Reply #5 on: December 07, 2016, 11:20:42 pm »
Well, I can't debug things remotely. Plus this is ASF, and I don't do ASF.
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf