element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog MAX32660 Evaluation Kit - part 5: FreeRTOS Example (with Issues, now Fixed)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 12 Jan 2019 5:25 PM Date Created
  • Views 2582 views
  • Likes 6 likes
  • Comments 9 comments
  • RoadTest
  • rt
  • max32660
  • maxim
Related
Recommended

MAX32660 Evaluation Kit - part 5: FreeRTOS Example (with Issues, now Fixed)

Jan Cumps
Jan Cumps
12 Jan 2019

I'm road testing the  Ultra-Low Power Arm Cortex-M4 Darwin MCU EVM.

During my tests I had difficulties with the FreeRTOS example that comes with the SDK.

It showcases tickless operation, and that does not work for me. The example doesn't wake up after enabling tickless mode.

It's supposed to wake up when clicking the user button.

image

 

Let's Get it Working First

 

Out of the box, this example has a few errors. Let's get it working first.

You can tell the example to go into tickless mode. This is a mode that puts the controller in a sleep with a vastly reduced clock.

The way to put it in tickless is by sending it a command via telnet (tickless 1).

The controller is expected to wake up when you press the user button on the evaluation kit. But it doesn't.

 

I raised a support case with MAXIM.

That case was closed after 4 weeks (two weeks factory close for new year included). Without a resolution. I did not have the impression that the support analyst analysed it.

edit: As you can see in the comments below, the issue was a code issue in the example.

The MAXIM FreeRTOS port is ok, but the example is wrong in a few places. I think it's ported from another board and not adapted to the actual hardware on the evaluation kits.

An analyst familiar with the device would have found it.

 

See the comments below for the progress and resolution.

 

What Does this Example Show?

 

It's a fine RTOS showcase that has a few competing threads, a slow runner, and a task that gets woken up by an interrupt on the UART.

The two competing ones are two led flash task. They show very simply how to reserve resources using mutexes.

Then there's a slower task that reports the uptime and some settings.

And there's also an interesting command line interpreter test. The interpreter is part of FreeRTOS+.

 

It's worth looking at the tickless demo part of the example.

When you submit tickless 1 to the command line interpreter, it allows the controller to go in a lower power mode.

All the time, FreeRTOS keeps managing resources and scheduling tasks. But as soon as it knows it has enough idle time ahead, it sets a timer interrupt and goes to sleep until that idle time finishes.

(the scheduler has enough info to know when a next task has to be activated. And the firmware has the option to decline the permission to sleep when it's doing something that needs the controller active.)

 

There's a GPIO interrupt handler that waits for you to push the user button. Thta interrupt works in the low power mode. It switches the application back to active.

 

When you test the application, you'll see that the LED tasks keep running, and the task that reports the uptime over UART runs too.

The UART listener, however, and the FreeRTOS+ command interpreter, are inactive.

 

How Can You Debug?

 

Applications with sleep modes are hard to debug. That's a fact of life with embedded development.

You can temporary configure FreeRTOS and your app not to go in these modes.

For that, you take care that, in the application specific FeeRTOSconfig.h file, you define configUSE_TICKLESS_IDLE to 0.

 

#define configUSE_TICKLESS_IDLE     0

 

The controller will stay awake and you can debug your firmware.

Don't forget to reset this define later if you want to take advantage of the various power saving schemes of FreeRTOS.

 

 

part 1: IDE install and Build First Example
part 2: Mod the PCB for Power Measurement
part 3: Power Measurement
part 4a: Low Power Sensor design - Barometer Hardware
part 4b: Low Power Sensor design - Barometer i2c and Init
part 4c: Low Power Sensor design - Barometer, Not Yet Power Optimised
part 5: FreeRTOS Example
side note A: C++ Eclipse Project
side note B: Create a Release Configuration
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 6 years ago in reply to fmilburn +3
    It had comments, but no real analysis and resolution. I think I know what's wrong. It is very likely an error in the example, not in the RTOS port. I think this is ported from, or intended for, another…
  • fmilburn
    fmilburn over 6 years ago +2
    Hopefully someone from Maxim reads this RoadTest and investigates why the support request was closed without comment or resolution.
  • DAB
    DAB over 6 years ago +2
    Sounds like it might be an interrupt issue. When you unplug the USB, you get a glitch on the power line, which probably wakes the device from deep sleep. Check for an enable and disable interrupt setting…
Parents
  • Jan Cumps
    Jan Cumps over 6 years ago

    oops, for some reason, the content of this blog got lost after my last update.

    Fixed that

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Jan Cumps
    Jan Cumps over 6 years ago

    oops, for some reason, the content of this blog got lost after my last update.

    Fixed that

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube