Debugging issue on kds for kl-25z

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

Debugging issue on kds for kl-25z

Jump to solution
720 Views
surenderreddyga
Contributor I

Hi,

I am trying to configure uart for KL-25z on KDS 3.0 with KSDK 1.3

UART_HAL_Init(UART1);

after the function call it is jumping to startup_MKL25Z4.s file and executing continuously there only, it is not coming out.

 

DefaultISR:

    ldr    r0, =DefaultISR

    bx r0

 

What is the reason i am not finding it, whatever the function calling with uart base address doing the same operation, jumping to DefaultISR

UART_BDH_REG(base)                 ((base)->BDH)
UART_BDL_REG(base)                 ((base)->BDL)
UART_C1_REG(base)                  ((base)->C1)
UART_C2_REG(base)                  ((base)->C2)
UART_S1_REG(base)                  ((base)->S1)
UART_S2_REG(base)                  ((base)->S2)

UART_C3_REG(base)

getting the same error for these things....................

I tried placing fsl_<module>_irq.c file into source folder but no use...............

Here the simple code which I am trying to debug and attached the project also

 

int main(void)

{

PE_low_level_init();

   UART_HAL_Init(UART1);

  UART_HAL_SetBaudRate(UART0,8000000,9600);

 

for(;;){}

}

Original Attachment has been moved to: test_uart1.rar

Labels (1)
0 Kudos
1 Solution
549 Views
DavidS
NXP Employee
NXP Employee

Hi Surender,

I suggest you review the Getting Started online tutorial for KDS/KSDK for the FRDM-KL25Z:

Freedom Development Platform for Kinetis KL|Freescale

At that link there is also documentation on the device so you know what peripherals it has implemented.

Your code above shows UART but the attached archive was trying to use LPSCI which the KL25Z doesn't have.

General information....Kinetis devices power up with most peripherals disabled/off.  Configuration needs to be done to ready a module for use.  #1 is to turn on the clock source to the module.  If you try to access a peripheral that has the clock disabled, you will get an exception like you are seeing.

Please read:  C:\Freescale\KSDK_1.3.0\doc\Getting Started with Kinetis SDK (KSDK) v.1.3.pdf

Note that KSDK_1.3 has many good examples to learn from:

C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\demo_apps

C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\examples

Reference:  C:\Freescale\KSDK_1.3.0\doc\Kinetis SDK v.1.3 Demo Applications User's Guide.pdf

Links to videos:

Kinetis Design Studio

Kinetis Software Development Kit

Regards,

David

View solution in original post

0 Kudos
1 Reply
550 Views
DavidS
NXP Employee
NXP Employee

Hi Surender,

I suggest you review the Getting Started online tutorial for KDS/KSDK for the FRDM-KL25Z:

Freedom Development Platform for Kinetis KL|Freescale

At that link there is also documentation on the device so you know what peripherals it has implemented.

Your code above shows UART but the attached archive was trying to use LPSCI which the KL25Z doesn't have.

General information....Kinetis devices power up with most peripherals disabled/off.  Configuration needs to be done to ready a module for use.  #1 is to turn on the clock source to the module.  If you try to access a peripheral that has the clock disabled, you will get an exception like you are seeing.

Please read:  C:\Freescale\KSDK_1.3.0\doc\Getting Started with Kinetis SDK (KSDK) v.1.3.pdf

Note that KSDK_1.3 has many good examples to learn from:

C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\demo_apps

C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\examples

Reference:  C:\Freescale\KSDK_1.3.0\doc\Kinetis SDK v.1.3 Demo Applications User's Guide.pdf

Links to videos:

Kinetis Design Studio

Kinetis Software Development Kit

Regards,

David

0 Kudos