KL82 ROM - Bootloader API

cancel
Showing results for 
Search instead for 
Did you mean: 

KL82 ROM - Bootloader API

590 Views
rtoma
Contributor III

Hi there,

I am looking at the KBOOT and the KL82 ROM. The thoughts are to use the the KBOOT as base for a bootloader. 

I have noticed that from the application level, one can gain access to Flash Driver available in ROM (chapter 9 of the Kinetis Bootloader Reference Manual). 

What has peeked my interest is the Bootloader API Tree (see below):

//! @brief Root of the bootloader API tree.
//!
//! An instance of this struct resides in read-only memory in the bootloader. It
//! provides a user application access to APIs exported by the bootloader.
//!
//! @note The order of existing fields must not be changed.
typedef struct BootloaderTree
{
void (*runBootloader)(void *arg); //!< Function to start the bootloader executing.
standard_version_t bootloader_version; //!< Bootloader version number.
const char *copyright; //!< Copyright string.
const uint32_t *reserved; //!< Do NOT use.
const flash_driver_interface_t *flashDriver; //!< Flash driver API.
} bootloader_tree_t;

Question:

Since KBOOT supports UART, I2C, SPI, USB, FlexCAN and QSPI peripherals, is there a way to gain access to the ROM drivers for these peripherals?

Many thanks!

Radu

kl82 ‌rom-api kboot

Labels (1)
10 Replies

138 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Customer can check the KL82 reference manual chapter 7.3.5 Bootloader Entry Point to call the (runBootloader) function at user application.

The bootloader supported peripherals setting located at Kinetis Bootloader Configuration Area (BCA).

Thank you for the attention.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

138 Views
rtoma
Contributor III

Hi Ma Hui,

I am aware of the bootloader entry call, but it's not useful for my application.
I would like to know if it's possible to access the ROM version of the peripheral (UART/SPI/QSPI) drivers from the application level. This would be similar with the ROM Flash Driver demo applications. However in order to do so one needs memory addressed for the ROM (the full Bootloader Tree). In essence I am asking what is the memory map for the KL82 ROM. 

Best wishes,

Radu 

0 Kudos

138 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Radu,

Kinetis product doesn't like LPC product to provide peripheral(UART/I2C/USB) ROM API function.

The KL82 ROM bootloader used peripheral API function doesn't open to the ended customer.

Sorry for that.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

138 Views
rtoma
Contributor III

Good morning Ma Hui,

I'm perplexed by your answer and its shortsightedness.

We, the developers, are choosing to go with NXP parts. However when we realized that we need more information and this information might prove useful for our application the answer is that this application is confidential and cannot be released by NXP.

Without this info, at the moment, I see no benefit in using KL82, for our application.

Best regards,

Radu 

138 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Radu,

NXP provides the MCUXpresso SDK software package for KL82 product, which includes QSPI/LPUART/I2C/DSPI peripheral driver. More detailed info, please check here to download MCUXpresso SDK v2.2 software package for FRDM-KL82Z.

The peripheral driver located at default path:

..\SDK_2.2_FRDM-KL82Z\devices\MKL82Z7\drivers

Please let us know know what info you still want to know. Thanks.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

138 Views
rtoma
Contributor III

Dear Ma Hui,

Seems that we are talking the same language, but we do not understand each other. I'll try to be as clear as possible.


I do have the SDK 2.2 for KL82. 

I know where the drivers are. I have looked at the drivers. I understand the drivers. 

I need to know the memory map for the ROM. Can you provide it?

Many thanks!

Radu

0 Kudos

138 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Radu,

I had double checked with Kinetis ROM bootloader engineer, the peripherals  LPUART/I2C/SPI/QSPI/USB  initialization API in ROM is not opened to customer.

So far, customer can call the ROM Flash driver API and ROM Bootloader entry point, as you already know that.

Thank you for the attention.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

138 Views
bobpaddock
Senior Contributor III

"API in ROM is not opened to customer."

So can we simply get the source code to the ROM loaders, for any of the parts that have build in ROM bootloaders (KL02, KL27)?
Really would like to fix some of the onerous bugs such as this in the KBoot HID.


Also we'd like to know what RAM areas are the various bootloaders going to use?
In some applications values need preserved across restarts, which is hard to do if don't know what RAM the bootloaders will trash.

What purpose does it serve to make this information hard to get?


0 Kudos

138 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Bob,

Please check below picture about KL82 ROM bootloader used RAM range:

pastedImage_1.png

Thank you for the attention.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

138 Views
rtoma
Contributor III

I'm wondering the same. One thing is for sure, I'll be cautious using NXP parts in the future. Plenty of other manufacturer's out there, which are more open and willing to help. 

From our point of view we have decided to move forward and go with a different bootloader (than KBOOT). Have a look at uTasker. Might be something that will fit your application.