Hi
I'm using a KL27Z32 for full speed usb.
In the attached project I try to port the usb_device_cdc_vcom FRDM_KL27Z (kl27z64) demo project to a KL27Z32 project
The project compiles but usb don't works :
in usb_device_class.c
if ((NULL != s_UsbDeviceCommonClassStruct[count].handle) &&
(controllerId == s_UsbDeviceCommonClassStruct[count].controllerId))
{
USB_OSA_EXIT_CRITICAL();
return kStatus_USB_Error;
}
return USB_error.
USB Stack User's Guide describe a method to Porting to a new plateform but since KSDK 2.1 I can not make it work.
Before I could import an example with import => existing ...
But since 2.1 KSDK, projects no longer compile with this method with a lot of error
Now to import a project I have to go through file=>new=>kinetis SDK 2.0 project
but I can not change platform with this method
What is it missing in my test Z32 project ?
or
How to use the demo for KL27Z64 with a KL27Z32 ?
Thank you in advance
Original Attachment has been moved to: test-kl27z32-bm-demo-vcp-usb.zip
Solved! Go to Solution.
Hi PO220
In this case you only want to change to a MCU that has less flash, this mean that all the features and registers will be the same, your flash size is the one that will change in the linker file. Please download the SDK_2.1_MKL27Z32xxx4 in Welcome to MCUXpresso | MCUXpresso Config Tools
Clone the usb project that you want: Go to file->new->kinetis SDK 2.x project, assigned a name to your project and select the SDK folder that you downloaded. go to Boards->FRDM-KL27Z board->Examples and select the usb that you want to clone. then in propierties of you clone project go to Settings->Cross ARM C Compiler->Preprocessor and change the CPU_MKL27Z64VLH4 to the what that you want (for example CPU_MKL27Z32VLH4). Do the same with Cross ARM C ++ Compiler->Preprocessor.
After this, in your project folders, go to settings and delete the MKL27Z64xxx4_flash.ld file and copy and paste the MKL27Z32xxx4_flash.ld file located in {SDK_2.1_MKL27Z32xxx4}\devices\MKL27Z644\gcc. please note that this part is the one that will change your flash memory size.
With this settings your MCU should change. Please take care that all defines in board.h are considering the frdm board that uses CPU_MKL27Z64VLH4.
Hope this information helps you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi PO220
In this case you only want to change to a MCU that has less flash, this mean that all the features and registers will be the same, your flash size is the one that will change in the linker file. Please download the SDK_2.1_MKL27Z32xxx4 in Welcome to MCUXpresso | MCUXpresso Config Tools
Clone the usb project that you want: Go to file->new->kinetis SDK 2.x project, assigned a name to your project and select the SDK folder that you downloaded. go to Boards->FRDM-KL27Z board->Examples and select the usb that you want to clone. then in propierties of you clone project go to Settings->Cross ARM C Compiler->Preprocessor and change the CPU_MKL27Z64VLH4 to the what that you want (for example CPU_MKL27Z32VLH4). Do the same with Cross ARM C ++ Compiler->Preprocessor.
After this, in your project folders, go to settings and delete the MKL27Z64xxx4_flash.ld file and copy and paste the MKL27Z32xxx4_flash.ld file located in {SDK_2.1_MKL27Z32xxx4}\devices\MKL27Z644\gcc. please note that this part is the one that will change your flash memory size.
With this settings your MCU should change. Please take care that all defines in board.h are considering the frdm board that uses CPU_MKL27Z64VLH4.
Hope this information helps you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
thanks