Arduino Portenta H7 blinking RGB LED after uploading

I am learning Arduino Portenta H7 and have an issue with uploading. After compiling and uploading (seem fine), the built-in LED of Portenta start binking yellow while holding green.
My code seems not to work properly and the Serial monitor is deactivated. I don't know how to interpret such signal from the Board. The program I am trying to run is using SPI pin of the Portenta Board to control a CAN module.
It would be great if someone can show me how to interpret LED signal from Portenta after uploading. Thank you very much and wish you a nice day!

A 4X long, 4X short blink pattern on the boards that use the "Arduino Mbed OS" core indicates Mbed OS has crashed. This causes the USB code that creates the CDC serial port to stop running, thus no port.

Debug information is printed on Serial1 at 115200 baud when Mbed OS crashes. You can view the debug output by connecting a serial adapter to pin 14 (no guarantee it will be helpful though).

1 Like

Hi Pert,

Thank you for your prompt reply. Can you share with me the official source where I can find such kind of info please? Then maybe next time I can consult it myself

Thank you very much and wish you a nice day!

Tien Loi

I did some searching of the documentation and help center and didn't manage to find a reference, so I guess the source would be me, haha :sweat_smile:

You can often find some very valuable information that was shared by the developers and users of the "Arduino Mbed OS Boards" platform of the Portenta by searching the GitHub repository:

I like to clear the default is:issue is:open search filter so I can get results from closed issue reports and pull requests as well.

I found this relevant discussion (the "per1234" user is me):

1 Like

Hi Pert,

After struggling with the Portenta, I figure out that if I put the object declaration inside the loop() or setup() then it should be fine.

void loop()
{                         
        #ifndef mcp2515
          // Configure mcp2515
          MCP2515 mcp2515(7);   
          mcp2515.reset();
          mcp2515.setBitrate(CAN_250KBPS, MCP_8MHZ);
          mcp2515.setOneShotMode();
        #endif
        
        // Send Fake Heartbeat Messages
        mcp2515.sendMessage(&checkList);  

I used to put the declaration at the beginning of the code (after #include) and it work properly on Arduino Mega

#include <Arduino.h>
#include <SPI.h>
#include <can.h>
#include <mcp2515.h>
#include <mbed.h>


MCP2515 mcp2515(7);

Can you please tell me what is the difference between them. Many thanks!

PS: Thank you for your Github link, I will check it out.

Tien Loi

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.