Page 2 of 3

Re: Road to K64F port

Posted: Sat Jan 06, 2018 12:52 pm
by wiml
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.

Re: Road to K64F port

Posted: Fri Apr 27, 2018 4:05 am
by walkerstop
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!

Re: Road to K64F port

Posted: Fri Apr 27, 2018 6:46 pm
by wiml
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.

Re: Road to K64F port

Posted: Fri Apr 27, 2018 8:46 pm
by walkerstop
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

Re: Road to K64F port

Posted: Sat Apr 28, 2018 6:27 am
by walkerstop
I'll see if my code works with your port

Re: Road to K64F port

Posted: Sun Apr 29, 2018 12:02 am
by walkerstop
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.

Re: Road to K64F port

Posted: Mon Apr 30, 2018 6:28 pm
by walkerstop
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!

Re: Road to K64F port

Posted: Thu May 03, 2018 12:44 pm
by walkerstop
Hi wiml, I saw you raised a pull request, but no SDHC driver?

Re: Road to K64F port

Posted: Fri May 04, 2018 11:07 pm
by walkerstop
Never mind, I see there is already a common Kinetis SDC driver.

Re: Road to K64F port

Posted: Sat May 05, 2018 6:48 am
by Giovanni
Hi,

Sorry that nobody is replying, I don't handle the Kinetis port and cannot help here.

Giovanni