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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Andy Clark's Blog MBed and magic red light
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Workshopshed
  • Date Created: 24 Aug 2021 7:33 AM Date Created
  • Views 2966 views
  • Likes 7 likes
  • Comments 6 comments
Related
Recommended

MBed and magic red light

Workshopshed
Workshopshed
24 Aug 2021

I was in the Arduino forum the other day, in the Portenta section and I read something rather odd about a bit of MBed software. It's called, as I understand it... Serial crash dump.

 

I have been experimenting with Arduino Portenta and an Adafruit E-Ink display which uses SPI. It wasn't working at all so I wondered if it was that the SPI bus was configured quite as I expected. So I swapped in some alternative pins and was greeted by an unresponsive board that was flashing its red LED. Which seemed quite strange as none of my code referenced the red LED. Must be some kind of dark magic.

 

Whilst looking around the forums I spotted another who was having the same issue and also got a flashing red light. I also found some code from Jeremy Ellis that promised to crash the Portenta. I wondered how such a simple example could cause a crash. There was one way to find out....

 

void setup() {
}

void loop() {
  analogWrite(A5,128);
}

 

So I uploaded and my red led started flashing. After watching for a few seconds I twigged that it was morse code for SOS. I had already connected a USB to TTL adapter which was on COM4 so I swapped the Arduino Serial monitor to point at that and got the following.

image

So as the error message suggests the pin selected is not capable of PWM output, we'd need to use D0 to D6 for that.

 

image

 

Reference

 

Minimal example for SPI

https://github.com/arduino/ArduinoCore-mbed/issues/131

 

mySPI

https://github.com/arduino/ArduinoCore-mbed/issues/115

 

Crash example

https://github.com/hpssjellis/my-examples-for-the-arduino-portentaH7/blob/master/my12-serial1-crash.ino

  • Sign in to reply

Top Comments

  • dougw
    dougw over 4 years ago +2
    Cute but non-standard.
  • dougw
    dougw over 4 years ago in reply to Workshopshed +2
    Its the first time I heard of one sending an SOS ....
  • ntewinkel
    ntewinkel over 4 years ago in reply to dougw +2
    Mine usually just send out smoke signals ;p
Parents
  • dougw
    dougw over 4 years ago

    Cute but non-standard.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 4 years ago in reply to dougw

    Fairly standard in the operating system world to hook up a serial console and see what is happening at boot. I don't know of this behavior is happens for all Mbed devices though?

     

    I remember having some challenges with the Arduino Yun as that was sending a Linux bootlog over the internal serial (Bridge) that was used to make the two halves of that board work together.  So these kind of features are not always welcome.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 4 years ago in reply to Workshopshed

    Its the first time I heard of one sending an SOS .... image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 4 years ago in reply to dougw

    Mine usually just send out smoke signals ;p

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • ntewinkel
    ntewinkel over 4 years ago in reply to dougw

    Mine usually just send out smoke signals ;p

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • dougw
    dougw over 4 years ago in reply to ntewinkel

    image 1 image 1 image

    image

    magic smoke signal

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
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