SAM G55 Xplained Pro TWI Sample not working

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

johann.horvat@gmail.com
Posts: 2
Joined: Thu Nov 12, 2015 2:07 pm

SAM G55 Xplained Pro TWI Sample not working

Thu Nov 12, 2015 2:12 pm

Did someone ever get those TWI EEPROM Examples (master and slave) working:

https://github.com/avrxml/asf/blob/mast ... _example.c
and its counterpart
https://github.com/avrxml/asf/blob/mast ... _example.c

And, yes I have two SAM G55 Xplained Pro connected to each other (EXT3 Pin 11 TWD4=SDA and 12 TWCK4=SCL), as well as SCL and SDA lines connected to VCC (+3V3) of the SAM G55 working as the master) and a common GND between both boards.

After flashing both boards, I would assume, that the master should start communicating via the SDA and SCL lines. But as my oscilloscope and my logic analyzer tell me, both pin levels stay at logic high (+3V3), without any change during the lifecycle of the program.

Am I missing something? :cry:
jonavarque
Posts: 29
Joined: Fri Jul 10, 2015 6:35 pm

Re: SAM G55 Xplained Pro TWI Sample not working

Tue Nov 17, 2015 10:32 pm

Where have you set the pin function in your code?
johann.horvat@gmail.com
Posts: 2
Joined: Thu Nov 12, 2015 2:07 pm

Re: SAM G55 Xplained Pro TWI Sample not working

Thu Nov 26, 2015 9:26 pm

jonavarque wrote:Where have you set the pin function in your code?
jonavarque,

Thank you for your hint, but what is the pin function?

I've searched the source code of ASF, but couldn't find a solution...
jonavarque
Posts: 29
Joined: Fri Jul 10, 2015 6:35 pm

Re: SAM G55 Xplained Pro TWI Sample not working

Sat Nov 28, 2015 7:35 pm

Somewhere in your code you must set the function of the pins to be TWI components. Check the pin multiplexing part of the manual. Check section 9.2.1 and table 9.3.

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 4 guests