element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
Arduino
  • Products
  • More
Arduino
Blog First look at the Portenta H7
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Arduino requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Workshopshed
  • Date Created: 11 Jul 2021 10:14 AM Date Created
  • Views 1886 views
  • Likes 11 likes
  • Comments 7 comments
  • arduino portenta
Related
Recommended

First look at the Portenta H7

Workshopshed
Workshopshed
11 Jul 2021

I decided to take a look at the Portenta H7 to experiment with its vision and multicore capabilities.

 

What's in the box?

There's not a lot in the box, just the Portenta board, a warranty note and tucked underneath an antenna that plugs into the UFL Connector for the Wifi and Bluetooth.

imageimage

However, that does not mean you are not getting a good deal, the Portenta board is crammed with features:

 

There is a dual-core microcontroller (STM32H747) with built-in graphics capability, Wifi, Bluetooth 5.1, 2MB Flash, 1MB Ram, a security chip (NXP SE0502), LiPO battery charger, USB-C, a temperature sensor and an RGB LED.

Naturally, there's all the usual microcontroller capabilities such as PWM, ADC and DAC, Digital I/O, a number of timers and configurable serial comms including SPI, I2C, Uart and CAN.

For me, one of the main features is the form-factor, same as the MKR boards and has mounting holes with space to fit bolts. Along with the MKR headers, there are 2 80 pin connectors, a battery connector (a 3-pin BM03B-ACHSS-GAN-TF), the USB-C connector and an ESLOV connector.

 

Documentation

The documentation is based around a number of tutorials in both classic Arduino C and MicroPython using the OpenMV IDE. As well as the main tutorials there are some pro examples on Github. My initial impression is that the documentation was lacking but with one exception, I believe I've found everything I need.

https://docs.arduino.cc/hardware/portenta-h7#tutorials

https://github.com/arduino-libraries/Arduino_Pro_Tutorials

 

There are also a number of linked datasheets and an STL model for you to import into your CAD tool.

https://content.arduino.cc/assets/Datasheet-Portenta-H7.pdf

 

imageimage

Arduino IDE 2.0

The IDE is quite similar to the previous version but with an inbuilt debugger and the serial monitor is now an internal window.

image

In my initial experiments with this, I thought I had bricked the device but it was simply that the IDE had not detected the COM port after the programming was complete.

You have to program the 2 cores separately but it is possible to use the same code for both if you use preprocessor directives to detect the core used e.g. #ifdef CORE_CM7

 

When uploading to the device it is using dfu-util, so if you want to automate your processes you'll need to use that rather than something like AVRDude or BOSSA.

 

The IDE seemed to spend a lot of time "indexing", not sure what that is but it seems to happen when you change the board you are using.

 

image

 

There also seems to be an "Advanced debugger" available and you can also use GDB

 

Firmware

The firmware is based on the MBed O/S and you can update that using a sketch or over the air. My bootloader was 21 and the current 22 so I've not updated that just yet.

https://docs.arduino.cc/tutorials/portenta-h7/por-ard-bl

https://www.arduino.cc/reference/en/libraries/arduino_portenta_ota/

 

Dual Core

As mentioned above there are 2 cores in the Portenta. These run at 2 different speeds but otherwise are quite similar. There is a claim that these can talk via RPC but I've not tracked down the documentation for that yet. Also If you look at the blink sketches and tutorials there is a bootM4() command and without that running on the M7 core, the M4 core does not start.

image

 

In the Github for the Arduino Pro Tutorials you can find a number of blink sketches including the following one which blinks via both cores.

https://github.com/arduino-libraries/Arduino_Pro_Tutorials/blob/main/examples/Dual%20Core%20Processing/BlinkBothCores/Bl…

 

I uploaded that onto the 2 cores and had blue and green random flashing.

 

What next

Next up, I hope to look at micropython and the vision module. Then I'll drop back to finding out how to make the 2 cores communicate. I can always 2 UART ports if I can't work out the "proper" way.

  • Sign in to reply

Top Comments

  • Sean_Miller
    Sean_Miller over 1 year ago +3
    Thanks for the write up!!! It will be interesting to see how it benchmarks for AI.
  • Jan Cumps
    Jan Cumps over 1 year ago +3
    I've been looking into 2-core controllers too lately. In the past I've worked with communication ICs, where the second core was more-or-less dedicated to the radio function. And with the TI Hercules. There…
  • BigG
    BigG over 1 year ago +1
    There is a claim that these can talk via RPC but I've not tracked down the documentation for that yet. I had spotted a fair bit of chatter about RPC on this forum post: https://forum.arduino.cc/t/passing…
  • Workshopshed
    Workshopshed over 1 year ago

    A shared memory example

     

    https://github.com/MatInGit/PortentaRPCMemory/tree/b21935fddbb6c1b4e27aa6ae8b63f6b1d948a483

     

    Uses "readytoread" and "markAsReady" functions to control access

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 1 year ago in reply to BigG

    These mutexes are useful in a single execution context.

    With 2 embedded cores, the execution contexts are usually isolated and other mechanisms are in place.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • BigG
    BigG over 1 year ago in reply to Workshopshed

    I suspect more ground work is needed to manage the sharing of resources to reduce these lock ups. I wondered whether more could be done using mbed's mutex function as I don't see it popping up in H7 examples or code so far: https://os.mbed.com/docs/mbed-os/v6.12/apis/mutex.html

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 1 year ago in reply to BigG

    Cheers, those examples look good although a slightly worrying comment about things locking up on one thread. Perhaps needs to include a "yield();" call?

    Given the way the code is written, I would not be surprised if it is using this feature internally.

    One example basically treats it as a Uart.

    https://github.com/TannerGilbert/Arduino-Portenta-Examples/blob/86be667e4225c4f15bf3e1ee015ade080a8e22df/dual-core/commu…

    image

    There's RPC mentioned on the Micropython side too. I wonder if the two are compatible.

     

    https://docs.openmv.io/library/omv.rpc.html

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • BigG
    BigG over 1 year ago

    There is a claim that these can talk via RPC but I've not tracked down the documentation for that yet.

     

    I had spotted a fair bit of chatter about RPC on this forum post: https://forum.arduino.cc/t/passing-variable-from-cm7-to-cm4-using-rpc/692026

     

    There's also been some chat on the MBED forum. Here's a few extracts:

     

    - there's a suggestion to use this: https://github.com/EmbeddedRPC/erpc/wiki#why-use-nxp-erpc-for-multicore-systems

    - a port of the NXP option for mbed: https://github.com/EmbeddedRPC/erpc

    - and here's a basic dual core Arduino example on github:https://github.com/hpssjellis/my-examples-for-the-arduino-portentaH7/blob/master/my02c-dual-core-RPC-variable.ino

    • Cancel
    • Vote Up +1 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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube