Upgrading from Meadow F7v1 to F7v2
Hi folks,
Jorge here, and in this post I wanted to point out a few things to consider when upgrading your Meadow Application from a F7v1 to a F7v2 board. While both may look very similar at first sight, F7v2 packs a number of upgrades in its internals, including a bit of rewiring for the pins to make room for some of the new features like I2S Sound.
Updating MeadowApp class signature
The first thing we need to do to upgrade our Meadow Applications to our F7v2 is to specify the new model in the Meadow App base class signature, so it will look like:
public class MeadowApp : App<F7MicroV2, MeadowApp>
This will make Meadow.OS know that the app will run on the F7v2 board and will take into account all the pins wiring and newer features and specs.
Meadow Pinouts
Another thing to consider is the Pinout of both boards:
Meadow F7v1 Pinout
Meadow F7v2 Pinout
If you look at these diagrams closely, you’ll see a few changes on the Interrupt and PWM Timer Groups. These changes are important to consider, as we point out in our Meadow IO Basics guides. Here’s a refresher:
- For the Interrupt Groups – you can use only one Pin per Interrupt Group, otherwise you will get an exception. For example, in F7v1 you wouldn’t be able to wire two Push Buttons on pins D05 and D07, since both belong to Interrupt Group 07. However, in F7v2, pins D05 and D07 are now in Interrupt Groups 04 and 07, so now you could use two push buttons on these pins.
- PWM Timer Groups – In this case, the PWM ports share timer groups, meaning that they run on the same frequency but can have different duty cycles. So when updating your project to F7v2 and if its using multiple PWM ports with different frequencies, refer to the pinout to do a bit of rewiring to ensure your project is using proper pins to avoid exceptions or errors when running your meadow app.
Time to Upgrade!
That’s all I wanted to show you in this post. If you haven’t upgraded to F7v2, I suggest you do so you can stay up-to-date with our latest and greatest features with the upcoming releases. I2S sound protocol will be promising when we can work with microphone input and sound output to make things like smart speakers, alarms, etc.
Happy hacking,
Jorge