SPI chip select configuration for ASF4 and SAMG55

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

I am attempting to configure an ATSAMG55 XPlained board to drive the SPI5 port using the newer START/ASF4 method.  It was easy to configure the SPI port to work using the START tool but then I tried to get the chip select to work.  Some details:

On the START dashboard I added a software component for SPI using FLEXCOM5.  I set this for master async mode.  Based on the produced example code I made a main functions that sends out a string of characters and then delays for 1/2 sec and then repeats.  I can see the clock sending out the data as expected.  So far so good.  I even have the callback IRQ toggling the LED on the board when the SPI transfers are completed.

Then I attempted to configure the chip select on the XPlained EXT3 port to assert during the transfers.  To do this I used START and the PINMUX Configurator tab.  I selected port PA5, entered a user label and set the pin mode to Peripheral IO. This does not generate a chip select that I could see on the scope.

I then tried the PINMUX Configurator tab and set the pin mode to Advanced, I set pin direction to OUT, initial level high, pull configuration off, and pin function to B.  I expect this should drive the chip select but had no luck.

I was able to control the pin directly as a GPIO and see it toggle on the scope so I know I'm looking at the correct line.

Also, I was sort of able to follow some of the abstraction layers down in the code to see that it appears to set the pin mux as I expect it to. 

If anyone has any ideas or suggestions, please let me know.  Also, I could find very little documentation on using the newer ASF4/START but, as expected, a lot on the older ASF3 functions.  Is the ASF4 really not usable yet?  It generated interrupt handler conflicts for me but I have a support ticket in on that issue and also posted that in the ASF forum yesterday.

Thanks for your time.

 

 

 

 

This topic has a solution.
Last Edited: Wed. Aug 23, 2017 - 01:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just the act of posting the information is useful because I thought of another thing to try.  I attempted to configure the other chip select on EXT1 which is PA11 as opposed to EXT3 which is PA5.  That brings up the question of how does the SPI port know which chip select to use for the transfer?  Neither the PA11 nor the PA5 pins are acting as selects.  The START configuration tool has no settings to control this so I'd imagine there is some other function I need to set to tell it what to use.  I'll have to go back to the data sheet to look for this.

 

If this is obvious to anyone or if anyone has any comments on whether ASF4 is usable I would like to hear it.

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nevermind, this issue is answered in the START utility user guide for the spi master.

 

When setting up the SPI driver there is a limitation that the slave select is "not automatically inserted during read/write/transfer, user must use I/O to control the devices' SS."