ASF 3.27.0 support for sams70

Discussions around product based on ARM Cortex M7 core.

Moderator: nferre

linuxjiahuo
Posts: 11
Joined: Mon Sep 07, 2015 4:18 am

ASF 3.27.0 support for sams70

Wed Sep 16, 2015 12:16 pm

hi,
Does the ASF 3.27.0 support the sams70 serial very nice?When I code using atmel studio 6.2,I find there are many errors while compling.

for example:

Error 37 'SAM_PM_SMODE_SLEEP_WFI' undeclared (first use in this function) F:\redat_share\ASF\proj_from_usb_S70\proj_from_usb_S70\src\ASF\sam\drivers\pmc\sleep.c 286 7 proj_from_usb_S70

The 'SAM_PM_SMODE_SLEEP_WFI' has been defined in F:\redat_share\ASF\proj_from_usb_S70\proj_from_usb_S70\src\ASF\sam\drivers\pmc\sleep.h as this:
#if (SAM3S || SAM3N || SAM3XA || SAM3U || SAM4S || SAM4E || SAM4N || SAM4C || \
SAM4CM || SAM4CP || SAMG55 || SAMV71)
# define SAM_PM_SMODE_ACTIVE 0 /**< Active */
# define SAM_PM_SMODE_SLEEP_WFE 1 /**< Wait for Events */
# define SAM_PM_SMODE_SLEEP_WFI 2 /**< Wait for Interrupts */
# define SAM_PM_SMODE_WAIT_FAST 3 /**< Wait Mode, startup fast (in 3ms) */
# define SAM_PM_SMODE_WAIT 4 /**< Wait Mode */
# define SAM_PM_SMODE_BACKUP 5 /**< Backup Mode */
#else
# define SAM_PM_SMODE_ACTIVE 0 /**< Active */
# define SAM_PM_SMODE_WAIT_FAST 1 /**< Wait Mode, startup fast (in 3ms) */
# define SAM_PM_SMODE_WAIT 2 /**< Wait Mode */
#endif

The sleep.c file also include the sleep.h like thie #include "sleep.h"
The macro SAMS70 does not affect the defines.
Thanks.
rtaudio
Posts: 1
Joined: Tue Nov 17, 2015 3:31 pm

Re: ASF 3.27.0 support for sams70

Tue Nov 17, 2015 4:23 pm

Probably a late reply, but I've noticed the same issue while evaluating ASF for a project I am planning, using ASF 3.27.3. Following the errors through to sleep.h, you can spot that there is no #if case for the S70, E70 or V70 chips at the start of the file, which means that all of these definitions are missed out, resulting in the errors.

Now, given that "the V71 is a superset of the S70, E70 and V70 series" (according to Atmel), I'm presuming that the sleep functionality should be the same across the chips. We can also see that all of these chips use the same setup process in the main sleep.c file, so my guess is that someone at Amtel simply missed out these chips from the #if statement.

I tried just adding || SAMS70, etc into the statement like so:

Code: Select all

/* SAM3 and SAM4 series */
#if (SAM3S || SAM3N || SAM3XA || SAM3U || SAM4S || SAM4E || SAM4N || SAM4C || \
		SAM4CM || SAM4CP || SAMG || SAMV71 || SAMV70 || SAMS70 || SAME70)

#if (SAM3S || SAM3N || SAM3XA || SAM3U || SAM4S || SAM4E || SAM4N || SAM4C || \
		SAM4CM || SAM4CP || SAMG55 || SAMV71 || SAMV70 || SAMS70 || SAME70)
# define  SAM_PM_SMODE_ACTIVE     0 /**< Active */
# define  SAM_PM_SMODE_SLEEP_WFE  1 /**< Wait for Events */
There are now 0 errors when compiling. However, I don't have the hardware to test if this actually works myself!

Most of the main ASF modules seem to work (GPIO, SPI, SSC, PWM, etc), however the DAAC and SMC have different issues with unknown type names (which also applies to the V71), so ASF support definitely isn't complete for the Cortex-M7. Hopefully Atmel will patch these issues ASAP.

Return to “SAM Cortex-M7 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest