KL27Z128V memory Map

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KL27Z128V memory Map

978 Views
ND2
Contributor III

Hello,

We are trying to run a USB code that was written for the KL27Z64V on the KL27Z128V and we are getting a hard fault since the memory map for both the controllers doesn't match. Hence we are looking for the memory map for the USB RAM for the KL27Z128V.

We already have the same for the KL27Z64V from Page 27 of this link: https://www.nxp.com/docs/en/data-sheet/KL27P64M48SF2.pdf

The USB RAM memory location is 0x400F_E000 for the KL27Z64V but what is it for the KL27Z128V is what we want to understand. Is there a document that you can direct us to?

Thanks

Neel.

0 Kudos
Reply
6 Replies

932 Views
ND2
Contributor III

The challenge is with the USB RAM address. The SDK is based on the KL27Z64V but I have a freedom board which is based on the KL27Z128V. Not sure what should be the USB_RAM address.

Can you please advice?

0 Kudos
Reply

922 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi neelshah,

  In fact, you have refered to the wrong SDK code, normally, to the KL27Z128 SDK code, you can download it directly, and it is based on the KL43 FRDM, please download the correct core again, you will know the detail USB_RAM usage:

https://mcuxpresso.nxp.com/

kerryzhou_0-1619404923192.png

After you download it, you may find the project is based on the KL43 directly, but don't worry, you can change the related project drivers and startup files in this folder:

SDK_2.8.0_MKL27Z128xxx4\devices\MKL27Z4

All the drivers are listed. The USB drivers is the same stack.

Please try it on your side.

 

Wish it helps you!

Best Regards,

kerry

 

 

0 Kudos
Reply

947 Views
bobpaddock
Senior Contributor III

For the parts that do not have dedicated USB memory, the normal system memory is used.
The start of that buffer must be aligned on a 512 byte boundary.

The buffer as a whole must not cross the high/low memory split.
Some parts don't care about the split, many do.
Use the linker to place it in a specific section at a specific location if needed.

Example for GCC:

#ifndef ENDPOINTS_USED
#define ENDPOINTS_USED (3U) /* Including the Control Endpoint */
#endif

#if( ENDPOINTS_USED > 16U )
#error More than 16 End Points is not allowed.
#endif

#define BDT_PER_EP (4U) /* 4 = (TX Odd/Even) + (RX Odd/Even) */

/*
* Every endpoint direction requires two 8-byte Buffer Descriptor (BD)
* entries. This part is Little Endian.
*/
typedef struct BDT
{
uint8_t bdctl_u8; /* Buffer Descriptor Control BD[ 0: 7] */
uint8_t rsvd_u8; /* Reserved: BD[ 8:15] */
uint16_t byte_count_u16; /* Byte Count. Only ten bits are used for the count. BD[16:32] */
uint8_t *addr_ptr_u8; /* Address */
} BDT;

/*
* There are:
* * 16 bidirectionnal end points -> 16 Rx, 16 Tx end points,
* * and there are ODD and EVEN buffer, for ping/ponging, -> 64 bdt's.
*/
static BDT bdt[( ENDPOINTS_USED * BDT_PER_EP ) ] __attribute__( ( __aligned__( 512U ) ) );

956 Views
ND2
Contributor III

Dear Kerry,
 
We did look at this link too during our research. We loved at page 543-545 but can’t seem to find the starting address of the USB RAM.
 
Can you please point it out for us?

Neel.

0 Kudos
Reply

953 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi neelshah,

KL27Z64V has the specific USB RAM, but KL27Z128V doesn't have the specific USB RAM, you may need to use the chip normal SRAM.

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply

962 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi neelshah,

  You have refer to the wrong document, please refer to this document:

https://www.nxp.com/docs/en/reference-manual/KL27P64M48SF6RM.pdf

This is for KL27Z128V, KL27Z64V and KL27Z128V is not the same.

So, please check the correct document first.

If you still have issues, just kindly let me know.

Best Regards,

Kerry

0 Kudos
Reply