What's with the Portenta H7 specific examples?

What's with the Portenta H7 specific examples?

There is no little blurb inside each example telling you what it does, why it is useful, why anyone should care about it, what extra hardware is needed. I actually know what I am doing with micro-controllers and I am totally confused with almost every example, I really feel for anyone knew to Arduino with a brand new Portenta trying to figure out how to use it.

Can someone post, which examples a beginner should try and why.

The examples so far are:

Doom
KernelDebug
LittleVGL
PDM
Portenta_Audio
Portenta_Camera
Portenta_SDCARD
Portenta_System
Portenta_Video
RPC
Scheduler
ThreadDebug
USBHost--keyboard controller, shell

A bit of a hint about which ones to try first and which ones are advanced or need extra hardware. Any suggestions about BLE examples to run or best WIFI examples would be appreciated.

2 Likes

Seeing as no one wants to give any example suggestions here. I have made a github with my examples. Presently working on webservers but that is not yet ready.

What I do have ready are:

my01-BlinkM7.ino: Yes blinking the Portenta is a bit different

my02-dual-core.ino: I like this dual core code. It is one file that you can load to either core

my03-BLE-LED-control.ino: Control the Portenta with bluetooth. Use nrfconnect or some other mobile app

my04-BLE-LED-multi-control.ino: Control other Portenta's that have the above BLE. Cycles through all of them and flashes their LED's

webserver.... not yet working

3 Likes

Thank you for your examples. If not for the dual clean I would have let the magic smoke out of my Portenta's with a hammer!

Doug

1 Like

johngalt:
Thank you for your examples. If not for the dual clean I would have let the magic smoke out of my Portenta's with a hammer!

Doug

LOL. I spent a few hours wondering why my blink program was not running on the M7 core when the problem was a bug I had on the M4 core, even though the M7 core program was not even activating the M4 core program.
Glad you liked it. I have a few videos coming out at https://www.youtube.com/playlist?list=PL57Dnr1H_egtm0pi-okmG0iE_X5dROaLw that you might like. Not really official until I figure out how to make a good video about installing the new Portenta Core 1.3.0

Thanks a lot for your examples! Made my life really easier!
But what I am really wondering about is my earlier post, which has got 48 reads, but 0 replies.

I am trying to generate a 20MHz clock signal for a external ADC (MCP3911). Since you are my hero now, do you have an idea for that one as well?

Thanks a lot and greatings from Hannover, Germany!

Johannes

jscladon:
Thanks a lot for your examples! Made my life really easier!
But what I am really wondering about is my earlier post, which has got 48 reads, but 0 replies.

I am trying to generate a 20MHz clock signal for a external ADC (MCP3911). Since you are my hero now, do you have an idea for that one as well?

Thanks a lot and greatings from Hannover, Germany!

Johannes

Thank you very much. Do you have a link to the original post? I know almost nothing about clock speeds, but really like using delayMicroseconds() which has to be connected to controlling a clock. If the other post doesn't mention it, what does the ADC (MCP3911) do and what are you trying to do?

Thanks for your quick reply!

I have fixed the problem by setting up an external osczillator. That seems to work fine so far.

Have a nice weekend!

Hi Jerteach,
thanks again for providing your examples.
I am completely new to dual core processing and I am learning a lot from your example.
I had the my02d-dual-core-RPC-timer.ino running a board for a few days and it crashed two times after 1 and after 3 days.
I am wondering now, if you need to add an additional semaphore to make sure, that the M7 and the M4 core are not trying to rund the "setvar" function at the same time.
From my understanding it should be taken care of even without a semaphore, since the M4 core does not really run, but only call the function.
I have not really understood, how the RPC1.call method works. Does it interrupt the M7 loop?

To answer your previous question about what I am trying to achieve:
The MCP3911 is a high frequency, high precision ADC. I am working with a sample rate of 20 kHz. The ADC stes an interrupt, the ISR just sets a flag, which the M4 is polling on. If it detects the flag, ist starts a SPI communication with the ADC to read the new sample. Any further processing of the sample should be done on the M7. Therefore I want to define a function on the M7, which handles a sample queue. M4 calls that function to add the new sample. Since the M7 uses the same function to receive a new sample from the queue, I was hoping that I do not need any semaphores for the shared resource (queue). Does that make sense to you?
Greetings from Hannover, Germany
Johannes

jscladon:
Hi Jerteach,
thanks again for providing your examples.
I am completely new to dual core processing and I am learning a lot from your example.
I had the my02d-dual-core-RPC-timer.ino running a board for a few days and it crashed two times after 1 and after 3 days. ...
Greetings from Hannover, Germany
Johannes

I see you posted an issue Thread example RPC_m4 · Issue #96 · arduino/ArduinoCore-mbed · GitHub I just try to get things working, I really have no idea how it works. Sorry.

As for what you are doing, it seems a fair bit above my skills. By the way have you seen the news about the debugger TRACE32 https://www.arduino.cc/pro/tutorials/portenta-h7/por-ard-trace32

Hi jerteach,
the example has been modified. Now it is really working fine. Check it out.

Cheers
Johannes

Just curious, did you find a way to get your 20 MHz clock output?

jscladon:
Hi jerteach,
the example has been modified. Now it is really working fine. Check it out.

Cheers
Johannes

I like the camera example just remember that the Portenta is the envie camera. I still haven't got the video example working, anyone with any luck with that?

By the way I have a few videos about TRACE32 and it is fairly cool for the Portenta main M7 core debugging. They should be coming out with a new and improved version soon, as someone from the company got in contact with me and they improved the product based on our conversations.

TRACE32 Setup Video

P.S. Arduino needs to make a few improvements until the M4 core can be debugged without special equipment.

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