[SAMR21 Xplained] SERCOM I2C slave driver (callback) problem

Discussions around product based on ARM Cortex M0+ core.

Moderator: nferre

piotrvv
Posts: 4
Joined: Sat Jan 24, 2015 6:12 pm

[SAMR21 Xplained] SERCOM I2C slave driver (callback) problem

Sat Jan 24, 2015 11:43 pm

Hello.
 
 I've got a problem with example project: sercom i2c slave driver (callback) on SAMR21 Xplained. Example uses SERCOM2, but board hasn't available pins. I changed it to SERCOM1, but my master device always sees 0x28 address. I know that PA16 and PA17 have shared functions with EDBG, but I have no idea what I should do with it. Will i2c work properly, when debuger will be using?
 
Best regards,
piotrvv
 
piotrvv
Posts: 4
Joined: Sat Jan 24, 2015 6:12 pm

Re: [SAMR21 Xplained] SERCOM I2C slave driver (callback) pro

Tue Jan 27, 2015 11:17 am

awneil wrote:You could've made a note on your previous post that you've moved on to here.
I'll do a note.
piotrvv wrote:my master device always sees 0x28 address
What do you mean by that :?:
No matter what address I'll set in source (default: 0x12), master always sees 0x28.
awneil wrote:The I2C (and SPI, and GPIO) connections to the EDBG are not used by the Debugger - they are used by the Data Gateway Interface (DGI).
 
If you're not using the DGI, it won't interfere with those lines.
I'm not using DGI. I didn't change the example project.

piotrvv
piotrvv
Posts: 4
Joined: Sat Jan 24, 2015 6:12 pm

Re: [SAMR21 Xplained] SERCOM I2C slave driver (callback) pro

Tue Jan 27, 2015 2:33 pm

I checked which devices are connected to the bus. 0x28 was always connected, even if the address in my program was different.

piotrvv
piotrvv
Posts: 4
Joined: Sat Jan 24, 2015 6:12 pm

Re: [SAMR21 Xplained] SERCOM I2C slave driver (callback) pro

Tue Jan 27, 2015 3:33 pm

I connected SAMR21 to Raspberry Pi. I assume that hardware and software on RasPi side is OK, because I can read and write to RTC device. Logic level is OK, checked on oscilloscope. SAMR21 writes back ACK always after RasPI sends 0x28 address - checked on logic analyzer.

piotrvv
rstoica
Posts: 1
Joined: Mon Nov 21, 2016 5:25 pm

Re: [SAMR21 Xplained] SERCOM I2C slave driver (callback) pro

Mon Nov 21, 2016 5:32 pm

0x28 is the internal connection to the EDBG as per the datasheet of Xplained SAMR21. So, if you power up the device through the EDBG that has it act actively on the 0x28 as a slave. Try target USB rather than EDBG USB for power up or the power pinout.

I believe then your expected behavior will show up.

/Andrei

Return to “SAM D20 Cortex-M0+ MCU”

Who is online

Users browsing this forum: No registered users and 3 guests