Road to K64F port
Moderator: utzig
-
- Posts: 7
- Joined: Fri Dec 08, 2017 6:52 am
- Location: Seattle, USA
- Has thanked: 2 times
- Been thanked: 5 times
Re: Road to K64F port
FYI, I've been pushing some changes to my fork of the repo at https://github.com/wiml/ChibiOS-Contrib , and I'll be making pull requests to the main chibios-contrib repository as individual parts become more mature. Let me know if you try to build from those branches and fail, in case I've forgotten to include something.
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
Re: Road to K64F port
Hi wiml, I also am working on getting a similar MCU working! The Teensy 3.6 and MK66FX1M0VMD18
I am going to look at what you did and compare it with what I did (the parts that are K60x generic, the board of course is different). I'm excited! Maybe we can collaborate. Maybe you fixed some things I haven't figured out yet, or vice versa!
Big question I have for you: Does USB for for you? This is the major frustrating I am having with my Teensy 3.6, some basic stuff like GPIO / pin control is working fine, but I can not seem to get USB to work! I just posted a thread about the problems I am having. Maybe you can help me or have some idea for me?
Here is the topic I just posted with the details of the problem I'm seeing:
viewtopic.php?f=26&t=4624
Anyway, it would be great to see both of these fine Teensy boards working under ChibiOS!
I am going to look at what you did and compare it with what I did (the parts that are K60x generic, the board of course is different). I'm excited! Maybe we can collaborate. Maybe you fixed some things I haven't figured out yet, or vice versa!
Big question I have for you: Does USB for for you? This is the major frustrating I am having with my Teensy 3.6, some basic stuff like GPIO / pin control is working fine, but I can not seem to get USB to work! I just posted a thread about the problems I am having. Maybe you can help me or have some idea for me?
Here is the topic I just posted with the details of the problem I'm seeing:
viewtopic.php?f=26&t=4624
Anyway, it would be great to see both of these fine Teensy boards working under ChibiOS!
-
- Posts: 7
- Joined: Fri Dec 08, 2017 6:52 am
- Location: Seattle, USA
- Has thanked: 2 times
- Been thanked: 5 times
Re: Road to K64F port
Hey walkerstop, nice to see another person working in this area!
I haven't tried using the USB peripheral on my Teensy3.5s — I was mostly interested in the SDHC and UARTs. But I did eventually hack a Teensy to allow me to attach a JTAG debugger, which makes debugging low-level drivers a bit easier (had to shake a few last nits out of the SDHC driver that way). My impression is that, for the peripherals they have in common, the K64 and K66 should be nearly identical. If I have time this weekend I'll take a look at your USB stuff.
I haven't tried using the USB peripheral on my Teensy3.5s — I was mostly interested in the SDHC and UARTs. But I did eventually hack a Teensy to allow me to attach a JTAG debugger, which makes debugging low-level drivers a bit easier (had to shake a few last nits out of the SDHC driver that way). My impression is that, for the peripherals they have in common, the K64 and K66 should be nearly identical. If I have time this weekend I'll take a look at your USB stuff.
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
Re: Road to K64F port
Cool thanks a lot, and if you can, please push your latest code to the Github fork so I can use it too! I'll want to use SDHC as well if possible
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
Re: Road to K64F port
Well dang, USB not working for me with your code either
I had to add some missing USB related registers and stuff to yours to even use USB, maybe the problem is somewhere in there, I mostly copied the usb register definitions from k20. They seem mostly the same.
I think I'm getting DMA overrun errors.
I had to add some missing USB related registers and stuff to yours to even use USB, maybe the problem is somewhere in there, I mostly copied the usb register definitions from k20. They seem mostly the same.
I think I'm getting DMA overrun errors.
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
Re: Road to K64F port
Well I am stumped. I thought maybe I was setting up the clocks wrongly, but I've been over the clock setup over and over and it seems OK.
I finally replaced the entire clock setup code for this hal with the clock setup code from the Freescale ARM GCC SDK for the MK66F18, and it made no difference, same result.
What I haven't tried yet is replacing the USB lld code. Maybe I can use the USB code from Teensyduino since that works fine on this MCU, just to narrow things down.
Just by looking at the datasheets and comparing them, I don't see why the same hal_usb_lld.c / .h code from k20 shouldn't also work on this MCU. It's maddening.
What happens is the USB enumeration always fails, and inside of the ISR I am always seeing USB errors, either the error for DMA failure or else PID verification failure.
If anyone can provide any help or suggestions I'd really appreciate it, I'm stumped!
I finally replaced the entire clock setup code for this hal with the clock setup code from the Freescale ARM GCC SDK for the MK66F18, and it made no difference, same result.
What I haven't tried yet is replacing the USB lld code. Maybe I can use the USB code from Teensyduino since that works fine on this MCU, just to narrow things down.
Just by looking at the datasheets and comparing them, I don't see why the same hal_usb_lld.c / .h code from k20 shouldn't also work on this MCU. It's maddening.
What happens is the USB enumeration always fails, and inside of the ISR I am always seeing USB errors, either the error for DMA failure or else PID verification failure.
If anyone can provide any help or suggestions I'd really appreciate it, I'm stumped!
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
-
- Posts: 9
- Joined: Fri Apr 27, 2018 2:35 am
- Been thanked: 1 time
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Road to K64F port
Hi,
Sorry that nobody is replying, I don't handle the Kinetis port and cannot help here.
Giovanni
Sorry that nobody is replying, I don't handle the Kinetis port and cannot help here.
Giovanni
Who is online
Users browsing this forum: No registered users and 31 guests