Author Topic: uTasker for Kinetis MK64  (Read 2110 times)

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
uTasker for Kinetis MK64
« on: March 06, 2023, 06:05:30 AM »
Hi Mark.
I can't find Kinetis MK66s anywhere, sold out at all vendors, but I do have a few MK64s.

My question is can I load the uTasker SD boorloader for MK66 on a MK64 without recompiling the program? My question is what is the uTasker bootloader clock frequency for a MK66, since the MK64 is slower, at 120Mhz, while the MK66 can go to 180Mhz. I use the SD card bootloader for the MK66.

At what frequency is the uTasker clock set for the MK66? I seem to have read somewhere that it was set to 120Mhz, in that case the binary that I compiled a long time ago for the MK66 I suppose would be useful for the MK64 without the need make changes and recompile.

I have made the firmware of my program (to load with uTasker SD bootloader) for the MK66 in MCUXpresso and I suppose that changing the PLL configuration so that it goes to x42 instead of x45 and in this way the clock works at 168Mhz would already work for the MK64. Although the MK64 is for 120Mhz, in Teensy 3.5 you can reclock it to 168Mhz, which is what I would also do in MCUXpresso to be able to use it with the MK64.

« Last Edit: March 06, 2023, 06:12:03 AM by LuisHS »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: uTasker for Kinetis MK64
« Reply #1 on: March 06, 2023, 02:30:13 PM »
Hi

The boot loaders of both K64 and K66 operate at 120MHz due to the fact that in order to operate at 180MHz the high-speed RUN mode is needed, in which Flash programming doesn't operate.
Therefore the code that you built and used for the K66 will be operating in RUN mode at 120MHz, which would also be a legal speed for the K64.

The K66 binary may operate on a K64 but there are some differences between the chips and so is not guaranteed - you can also rebuild your original version by changing the target define from K66 to K64, which would be the sure way to do it.

Although the Teensy project does allow overclocking the K64 to achieve faster core performance I don't recommend doing it since it is operating the chip outside of its specifications and so this should only really be used for personal hobby projects where the reliability if not too critical.

Regards

Mark

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: uTasker for Kinetis MK64
« Reply #2 on: March 07, 2023, 03:24:00 AM »

Thanks mark
Do you know where I can order some MK66s ?, sold out at all vendors until 2024.

I have some projects made for MK66 that I will eventually try to migrate to RT1024 or RT1064, but until I can do that conversion I would like to be able to get some MK66 so I can continue to build my boards with MK66. That's why ultimately, I wanted to try to see if these MK64 that I have here can be used as a replacement by overclocking to 168Mhz, I know it's not ideal, but it would be the last option due to the shortage of chips.

On the other hand, I wanted to ask you some questions about the use of the uTasker SD bootloader with the RT1064.

1.- The uTasker binary is encrypted so that it cannot be extracted from the chip in commercial products?.
2.- The user firmware that will load the uTasker bootloader is encrypted with your program as it was done with the MK66 or it must also be encrypted with the NXP system to encrypt binaries.

I find it confusing to work with i.MX since in these the protection against reading and extracting the program is not like with the Kinetis with chip reading protection, but rather encrypting the binary before loading it on the chip, with a key that must be previously write in the chip so that it decrypts the binary at runtime. So now to use uTasker on the RT1064, it sees that there is a conflict in the encryption, on the one hand there is the encryption of the i.MX RT and on the other hand the encryption of uTasker on the binary to be loaded (in my case by SD).


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: uTasker for Kinetis MK64
« Reply #3 on: March 07, 2023, 07:50:48 PM »
Hi

K66 is still a big problem and I don't know where to obtain them from apart from some brokers, although they can charge up to $900 for each chip it seems. In addition I have had a case where the chip was not the one written on the package but a similar one without Ethernet inside, so it is a risk too!

The uTasker serial loader for iMXRT can be encrypted (and clone protected) with almost zero effort. There are guides and videos at https://www.utasker.com/iMX/developers.html
The uTasker project includes all encrypting tools so it is much simpler than the NXP method (which is a one-time usable key method). The key used in every chip is different (randomly generated) and doesn't need to be known/managed by the user. It won't interfere with the NXP encryption method if that were used on the same chip and the HW can be reused with different projects since the project key is still replaceable.
Each time the uTasker reference project is build it automatically generates plain code and encrypted outputs (you can simply tell it which project key you want to use to personalise it) and so there is almost no effort involved.

Note that the chip shortage has resulted in the uTasker project investing in the following chips, which are reserved for uTasker users and available at reduced prices (in comparison to distributors):

IMXRT1062DVL6B - commercial
IMXRT1062CVL5B  - industrial


These are 10mmx10mm 196 pin BGA with full features (2 x Ethernet, 2 x USB ,1Meg RAM, TFT display interface) and footprint compatible (and code 99% compatible) with i.MX RT 1051/52/61/62 and are useful for porting Kinetis projects to (they can also be used in place of i.MX RT 1064 as long as there is a QSPI flash connected)). With 600MHz zero wait state operation (up to 1.2G instructions per second) they are FAST as well. As well as having very high compatibility with Kinetis the uTasker project makes it simple to port from Kinetis projects and, with the chip stock, can ensure that supplies are immediately available when needed (some parts still have over a year delivery time otherwise).

There are good stocks available for immediate delivery or reservation, whereby each new project can order/reserve up to 1'200 pieces at the moment. (Quantities of up to 10'000 are possible for immediate delivery but only under exceptional circumstances since it is preferred to supply as many new projects as possible).

Regards

Mark

P.S. The encryption used on the SD card is compatible with the boot loader encryption and is there is no conflict. The encrypted SD card content is simply copied and store in the QSPI flash in the same format.

P.P.S. I will make a post repeating the 1062 details since it hasn't generally been advertised here before.

Offline LuisHS

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: uTasker for Kinetis MK64
« Reply #4 on: March 08, 2023, 02:39:19 AM »

Thanks mark.
Regarding the i.MX RT, do you know if I can configure the boot to be done from an SD card?

If so, could I have my encrypted firmware on that SD card? So that the microcontroller can boot my firmware from SD and also have other files of my application stored on that same SD card, such as some configuration file, all using FatFS.

In that case, I suppose that a bootloader would not be necessary, the SD card would already have the boot firmware and it would be enough to copy the SD card or create an SD formatted in FAT32 and copy the boot file with my firmware.

As for the RT1062 and others you refer to, you sell them too, they are 0.8mm pitch??, I have not worked with pitches smaller than 0.8mm because the PCBs would be more expensive and I suppose that the soldering process in oven can also be more delicate.


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: uTasker for Kinetis MK64
« Reply #5 on: March 08, 2023, 01:53:40 PM »
Hi

Booting (or boot loading) from an SD card is possible and the card can be used for other storage too.
RT1062s are 0.65mm pitch. Since PCB hole sizes are a little smaller the PCB can be more expensive (about +20%) but the 0.8mm BGA is in fact a more expensive part and they tend to cancel each other out and results in smaller possible boards. Soldering of 0.65mm pitch is no problem since the chips align themselves when the solder is molten so I don't think it is a factor to consider.

Regards

Mark