Commit Graph

279 Commits

Author SHA1 Message Date
Dan Halbert 7bb90dbf45 remove redundant port/*/.gitignore; cleanup others 2022-10-01 11:52:36 -04:00
Jeff Epler 346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Dan Halbert 4cb69a51d5 Use MP_WEAK for default board.c routines 2022-09-08 07:36:50 -04:00
Dan Halbert 84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00
Neradoc eabe8b971a list extensions instead of macros names ("bin,uf2" not BIN_UF2)
the modules_support_matrix usees a dictionnary per board instead of a list
optionally include the frozen modules URLs in it
2022-07-26 18:15:59 +02:00
Neradoc d021d9ae4a Move build extensions to board directories
- define CIRCUITPY_BUILD_EXTENSIONS to predefined values
- set CIRCUITPY_BUILD_EXTENSIONS in port and board config
- reuse the support matrix "get_settings_from_makefile" to get it
- move the existing port and board specific values
- remove the C3 specific board values because it's not the default
- update build_release_files.py to use get_settings_from_makefile
2022-07-26 18:15:50 +02:00
Dan Halbert 8bb369cac5 refactor debug UART to console UART; get working on ESP32 2022-06-30 23:16:46 -04:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Dan Halbert 1fb210bd40
Merge pull request #5491 from pypewpew/remove-gamepadshift
Remove gamepadshift module
2022-05-25 13:58:06 -04:00
Radomir Dopieralski c0152e7dab Remove gamepadshift module
Everything should be using the keypad module instead.

Note: there are several boards that still had gamepadshift enabled. I
did not contact their authors to make sure they already switched to
keypad in their code and documentation. We should probably wait with
merging this for their go ahead.
2022-05-25 00:48:55 +02:00
Scott Shawcroft 0ea72d61e0
Merge pull request #6425 from KurtE/teensy_retain_fs
Teensy Builds retain Filesystem
2022-05-24 11:03:47 -07:00
Paint Your Dragon 92fa02effa
Change 12- to 16-bit scaling to match other ports
Result is identical, implementation just resembles other ports instead of being all 1337 about it.
2022-05-24 08:49:05 -07:00
Paint Your Dragon 44b31b098e
Correctly scale analog reading per issue #4794 2022-05-24 08:44:09 -07:00
KurtE d47662c448 Teensy Builds retain Filesystem
Changed a few things in the link step that satisfies the teensy
loader apps, both the teensy.exe as well as the teensy_loader_cli

such that when you program the board again it should retain the
file sytem that is stored in the upper area of the Flash
2022-05-24 07:06:16 -07:00
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert 3c20b5f95f use validator in mimx UART constructor 2022-05-20 00:04:49 -04:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
KurtE 6378343bb3 As I mentioned in issue #6332,
there return of a read operation that times out with no data received
is inconsistent:
```
Adafruit CircuitPython 7.3.0-beta.1-31-g73f6b4867-dirty on 2022-04-30; Adafruit Feather RP2040 with rp2040
>>>
>>> import board, busio
>>> print(board.UART().read(5))
None

Adafruit CircuitPython 6.3.0 on 2021-06-01; FeatherS2 with ESP32S2
>>> import board,busio
>>> print(board.UART().read(5))
None

Adafruit CircuitPython 7.3.0-beta.1 on 2022-04-07; Adafruit Feather STM32F405 Express with STM32F405RG
>>> import board, busio
>>> print(board.UART().read(5))
None

Adafruit CircuitPython 7.3.0-beta.1-31-g73f6b4867-dirty on 2022-04-28; Teensy 4.1 with IMXRT1062DVJ6A
>>> import board, busio
>>> print(board.UART().read(5))
b''
```

Since I have a PR on this file anyway, I thought I would put in the change to make it consistent
with the other 3 board types I tried.  Can not say about any of the others.
2022-05-03 13:39:49 -07:00
KurtE 73f6b48676 [mimxrt (teensy) Allow Any GPIO pin for RS485 pin
The existing code was setup that allowed you to specify an RTS
pin to be used as an RS485 direction pin, however there are no
RTS pins that are exposed on any of the Teensy 4.x boards.

Instead Arduino code base allowed you to specify any GPIO pin to
work instead.  So I added the code in to facilitate this.

In addition the alternative code to wrap your own GPIO pin set high and low
around call(s) to uart.write() will not currently work, unless maybe you
fudge it and add your own delays as the write will return after the last
byte was pushed onto the UART’s hardware FIFO queue and as such if you
then immediately set the IO pin low, it will corrupt your output stream.

The code I added detects that you are setup to use the RS485 pin and
before it returns will wait for the UART’s Transfer complete status flag
to be set.
2022-04-27 11:26:08 -07:00
Dan Halbert 5b7e0754dd
Merge pull request #6287 from KurtE/mimxrt_pwm
Fix PWM Support for the MIMXRT boards
2022-04-25 09:02:40 -04:00
KurtE 8d9dc1fb93
Update ports/mimxrt10xx/supervisor/port.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 11:47:40 -07:00
KurtE 3c343cf1b8
Update ports/mimxrt10xx/supervisor/port.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 11:47:30 -07:00
KurtE 1312e5c759
Update ports/mimxrt10xx/supervisor/port.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 09:16:27 -07:00
KurtE f102c15bb4
Update ports/mimxrt10xx/common-hal/pwmio/PWMOut.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 09:15:40 -07:00
KurtE 79dd2a6cd5
Update ports/mimxrt10xx/common-hal/pwmio/PWMOut.c
Fix Comment spelling

Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 09:15:29 -07:00
KurtE 53b7caf13c
Update ports/mimxrt10xx/common-hal/pwmio/PWMOut.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2022-04-22 09:15:01 -07:00
Dan Halbert 4aea8049c5
Merge pull request #6279 from mjs513/main
Added Settable Clock for MIMXRT BOARDS
2022-04-20 08:31:41 -04:00
Dan Halbert 1fcc73bc24
Merge pull request #6261 from KurtE/PortSerialHooksIssue
disable on mimxrt10xx (Teensy40 41) Serial port Hooks
2022-04-19 23:04:07 -04:00
KurtE 49769cfea4 Convert to use debug rx/tx pins to trigger adding this code
As per review request
2022-04-19 14:02:16 -07:00
KurtE eab4867e61 Remove dead replaced code
As requested, I removed the dead code that was replaced
2022-04-18 15:46:36 -07:00
mjs513 208bfb33aa Deleted Warnings Chanaged ValueError Method 2022-04-17 15:04:16 -04:00
KurtE 02a0939d2e Fix PWM Support for the MIMXRT boards
There were two main issues with the PWM support.

The first is they would fail to work properly if the board goes
into low power mode, when you do things like:     time.sleep(0.25)
Can make partially work with this by turning on the proper flags
in each of the FlexPWMTimer Timers/sub-timers, but this did not
appear to work if for example you have both A and B channels
enabled.

Second main problem is that the code did not work with the X
channel of each timer/sub-timer.  It looks like someone had
earlier started support for this, But was not sufficient.

Needed to bypass the SDK code and get it closer to the PJRC code.

That is we set the PWM_CTRL_FULL_MASK, which then uses  base->SM[submodule].VAL1  to control
when the timer is reset, so it sets up your cycle/frequency.  But then this implies that X channel
which uses 0, 1 has to be handled specially. So for the different channels:
    A - Uses VAL2 to turn on (0) and VAL3=duty to turn off
    B - Uses VAL4 to turn on (0) and VAL5 to turn off
    X - As mentioned above VAL1 turns off, but its set to the timing for freqency. so
        VAL0 turns on, so we set it to VAL1 - duty
2022-04-16 09:00:45 -07:00
mjs513 0b6c451fdf Add Overclocking Warnings to Processor.c 2022-04-16 11:01:50 -04:00
mjs513 fd41c1ac5b Update based on PR Comments 2022-04-14 06:45:16 -04:00
root 716497c132 corrected pre-commit errors 2022-04-13 12:04:28 -04:00
root 60e330fb0d Added Settable Clock for MIMXRT BOARDS 2022-04-13 09:47:55 -04:00
Dan Halbert 7be66a5733
Merge pull request #6265 from KurtE/teensyMM
Add Teensy MicroMod board
2022-04-11 12:31:42 -04:00
KurtE f95a68a37c Rename the board name
Renamed the board both name of directory within boards, but also the
name reported board name: board_id -- sparkfun_teensy_micromod

Adafruit CircuitPython 7.3.0-beta.0-10-g2a3eb49da-dirty on 2022-04-10; SparkFun Teensy MicroMod Processor with IMXRT1062DVL6A
2022-04-10 16:56:51 -07:00
KurtE ecf2f1c80c Add to board object other Serial and I2c pin names
While testing out this and the new MicroMod Teensy port, @mjs513
and myself found it desirable to have logical pin names for the
different Serial UART objects.  It is a lot easier and clearer
to use and maintain to do something
like: uart4 = busio.UART(board.TX4, board.RX4)
than have to go look up the pin numbers for each board.
2022-04-10 05:39:43 -07:00
KurtE 7ff0036a26 Fix the pre-check stuff 2022-04-08 15:59:27 -07:00
KurtE 2a3eb49da7 Update the pins.c
I fixed a couple issues in the pin name definitions.

The pin names are sort of Teensy centric in that the priority is given
to the pin names you would use in Arduino like D0, D1, ...

But also added names for the MicroMod names in particular the names
on the front of the ATP carrier board

Also updated manufacturer to be both PJRC and Sparkfun
2022-04-08 07:41:51 -07:00
KurtE 93e9e3ad90 Fix end of line 2022-04-07 15:52:01 -07:00
KurtE 03e0acde94 Trying to cleanup the pre build messages 2022-04-07 14:11:22 -07:00
KurtE 2cb422fb19 Create W25Q128JV.ld
Add flash file needed for Teensy MicroMod,
2022-04-07 12:09:56 -07:00
KurtE a74ec22aa4 Start setting up a Teensy MicroMod port
I have done a first pass through the files
this also includes a new VID/PID from sparkfun
2022-04-06 17:58:22 -07:00
KurtE 219ef5e407 disable on mimxrt10xx (Teensy40 41) Serial port Hooks
As mentioned in issue #6241  the commit to setup port hooks is now
    causing all input/output that are to go to the Mu window to also
    go to the LpUart that is defined the port serial.c

    and in this case it goes to lpuart4, which on Teensy 4, 4.1 is
    used on Arduino Serial2.  With this new code this port no longer
    works properly.

    This is one way to solve it, in that there is a #if defined() that
    if not set, all of the code in this file is ignored and the higher
    level supervisor stub versions of these functions will be used, which
    don't interfere with Serial2 and my test sketch works again.

    Note: the PR for Switch to Port Serial Hooks, also changed code in
    other ports.  I have not tried to see how.

    There are other more global fixes for this, in which maybe a higer
    level  #if that disables the code within the top level supervisor.  Or
    could be software controlled

    Again this may not be the final solution, but at least it gets
    Serial2 up and running agin.
2022-04-06 15:58:27 -07:00
Scott Shawcroft f5d90fc84f
Switch to port_serial_* hooks
This makes it easier to integrate port specific serial alongside
the common approaches.
2022-03-22 19:40:33 -07:00
Scott Shawcroft 45f9522a63
Fix EVK status led to be inverted 2022-03-08 18:15:43 -08:00
Scott Shawcroft 96f5eec2ee
Add Teensy 4.1 power pin and fix SWD for DEBUG=1 2022-03-08 17:17:07 -08:00
Scott Shawcroft 83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00