-
Notifications
You must be signed in to change notification settings - Fork 7.3k
boards: Support Teensy Micromod #88502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
e3b5e19
to
feb9331
Compare
boards/pjrc/teensy4/teensyMM.dts
Outdated
@@ -0,0 +1,55 @@ | |||
/* | |||
* Copyright (c) 2020, Bernhard Kraemer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase filename
boards/pjrc/teensy4/teensyMM.yaml
Outdated
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
identifier: teensyMM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
identifier: teensyMM | |
identifier: teensymm |
and filename to lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the files as I mentioned for earlier review plus the teensyMM -> teensymm
CONFIG_UART_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_GPIO=y | ||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=600000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=600000000
should come from DTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not done this one yet as this is a direct copy of the Teensy 41 defconf file
So have been trying to be consistent.
There are parts of the current configs that I don't fully understand why. Example, it shows support for the SDCard (SDIO) for the Teensy 4.1, but not the Teensy 4, yet the T4 can support it through the connector on the bottom
of the board.
Will look at this more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the Sparkfun Teensy Micromod is having a completely different pinout than the PRJC classic Teensy boards:
https://cdn.sparkfun.com/assets/5/a/3/6/0/MicroMod-Teensy_V1_3.pdf
https://learn.sparkfun.com/tutorials/designing-with-micromod/all#pin-specifications
Could you confirm which pinout you are documenting here?
As an alternative from the "teensy", you can also aim for the "boards/sparkfun/micromod" board as a directory as it is a SparkFun-made board.
Thank you for extending the MicroMod collection!
I guess it depends on what we mean by pinout. That is, if you buy one of these boards, you are directed to install the Teensy boards through the Arduino The pin numbers shown are the ones defined in cores/teensy4. They match the pins for the T4 with 6 pins added at the We could additionally show the Micromod pin numbers as well if desired. Like I could show the complete list for
That is a possibility. Although it gets confusing these days. As I mentioned: From a recent blog on PJRC
With Pin numbering/naming wondering if maybe from a current conversation on the Arduino Zephyr porting. Where one |
857e96f
to
4e32710
Compare
Note: I pushed up a new copy of the index.rst, which duplicates the MMOD pin mappings and it includes |
Just to summarize the different pin naming used. Teensy doc (PCB pin number)SparkFun doc (using Arduino IDE names, PCB pin numbers of the original Teensy, and micromod pin number)NXP doc (final chip numbers)Here, this is turned into a teensy board: the pinout matches names of another PCB, given by SparkFun for backward compatibility purpose. It can become tedious to make the teensy pin numbers the standard while the pinout of the board is the MicroMod standard. Willing to try turning this into a MicroMod? :) This might really not be as hard as it sounds. Links that helped me:
|
Every vendor has a different way to specify GPIO pins, sometimes it is zephyr/boards/sparkfun/micromod/micromod_nrf52840.dts Lines 38 to 61 in 3c2d2a6
Once this is done, it becomes possible to use new names like Further reading:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GPIO nexus probably does not need to be added on this PR though...
In addition to what @nordicjm pointed at (thank you!) I only spotted one small detail that needs at least a comment on the README.rst, or be removed to avoid dealing with it on this PR.
Besides this, LGTM thank you!
c2f913f
to
367a281
Compare
367a281
to
9792fc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just pushed some minor doc fixups (including using transparent image and not the weird screenshot that was there initially)
also dropped the unrelated change you had made to blinky :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compliance errors need resolving also
/* WINBOND flash memory*/ | ||
w25q128jvxgim: w25q128jvxgim@0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry not sure what you mean by newline? do you mean I should add a blank line or
was there a windows cr/lf...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a newline so that there is a newline e.g.:
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>;
/* WINBOND flash memory*/
w25q128jvxgim: w25q128jvxgim@0 {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed up the change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops pushed again. I see editor insterted tabs to align it... removed
boards/pjrc/teensy4/teensymm.yaml
Outdated
ignore_tags: | ||
- net | ||
- posix | ||
vendor: nxp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't right, nxp doesn't create teensy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed that to sparkfun as they are the one who sells it.
Note: I did not update the Teensy 4 or 4.1 versions which also have nxp.
7f71a8a
to
9385932
Compare
@KurtE It seems like the job that failed is unrelated to the board you added. Thank you for the efforts! |
|
@josuah @nordicjm - looks like some twister issues. Where if I am reading this correct, the SD test is failing:
Again, sorry I am still getting my feet wet with this system! That test does build for teensy41 and also fails on teensy40. My wild guess is that maybe the failure is due to me having stuff in it .yaml file:
I believe I should remove the netif:eth as that is not in the teensy40.yaml file, which makes sense as only the But: I still wondering about - sdhc Suggestions: I am thinking I might try removing those two defines? Or should I try adding it Note: I have tried the SD out on a couple of different MMod adapter boards. I believe I showed a few of them. EDIT: picture was pasted upside down so editing top to bottom... Thanks again for all of your help |
I would propose testing with the twister command: the build flags are very slightly different.
Maybe it would work to introduce everything except the SD card support, to allow merging this and work on troubleshooting it later if that makes things easier. |
Thanks, I tried that version of command line and it did not appear to work for MM nor 41... I will try the changes that I mentioned and see if that helps. |
The Sparkfun Teensy Micromod was designed by Paul of PJRC and manufactured and sold by Sparkfun.com The functionality of this board is very similar to the Teensy 4. It has the same basic pin definitions of the Teensy 4 but added 6 additional IO pins. Which added a lot of possibilities to use the flexio system in new ways, such as for camera input. It was unclear if the board should be added here or all of this duplicated under Sparkfun, but now Sparkfun is also now responsible for the manufacturing and sales of the Teensy 4 and Teensy 4.1, here feels like a good place. Note: I am mainly doing this as a learning experience on how to use zephyr directly, as most of my experiences with Zephyr is done through the current WIP Arduino Wrappers for some of their boards. So far I duplicated the Teensy 4.1 files, then modified, like removed the Ethernet and added the I2C2 object. I updated the flash information as these come with a 128mbit version versus the 64 on T4.1 or 16 on T4. So far I have only test blink. plus: cdc-acm example, plus adding gpio to it, plus logging, plus blinking. Signed-off-by: Kurt Eckhardt <[email protected]>
The Sparkfun Teensy Micromod was designed by Paul of PJRC and manufactured and sold by Sparkfun.com
Note: Earlier I created an Issue about this, which was then converted to a discussion
#88210
The functionality of this board is very similar to the Teensy 4. It has the same basic pin definitions of the Teensy 4 but added 6 additional IO pins. Which added a lot of possibilities to use the flexio system in new ways, such as for camera input.
It was unclear if the board should be added here or all of this duplicated under Sparkfun, but now Sparkfun is also now responsible for the manufacturing and sales of the Teensy 4 and Teensy 4.1, here feels like a good place.
Note: I am mainly doing this as a learning experience on how to use zephyr directly, as most of my experiences with Zephyr is done through the current WIP Arduino Wrappers for some of their boards.
So far I duplicated the Teensy 4.1 files, then modified, like removed the ethernet and added the I2C2 object. I updated the flash information as these come with a 128mbit version versus the 64 on T4.1 or 16 on T4.
So far I have only test blink.