Road to K64F port

ChibiOS public support forum for topics related to the Freescale Kinetis family of micro-controllers.

Moderator: utzig

wiml
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

Postby wiml » Sat Jan 06, 2018 12:52 pm

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.

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Fri Apr 27, 2018 4:05 am

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!

wiml
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

Postby wiml » Fri Apr 27, 2018 6:46 pm

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.

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Fri Apr 27, 2018 8:46 pm

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

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Sat Apr 28, 2018 6:27 am

I'll see if my code works with your port

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Sun Apr 29, 2018 12:02 am

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.

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Mon Apr 30, 2018 6:28 pm

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!

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Thu May 03, 2018 12:44 pm

Hi wiml, I saw you raised a pull request, but no SDHC driver?

walkerstop
Posts: 9
Joined: Fri Apr 27, 2018 2:35 am
Been thanked: 1 time

Re: Road to K64F port

Postby walkerstop » Fri May 04, 2018 11:07 pm

Never mind, I see there is already a common Kinetis SDC driver.

User avatar
Giovanni
Site Admin
Posts: 10829
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 321 times
Been thanked: 269 times
Contact:

Re: Road to K64F port

Postby Giovanni » Sat May 05, 2018 6:48 am

Hi,

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

Giovanni


Return to “Kinetis Support”

Who is online

Users browsing this forum: No registered users and 1 guest