S32K144 PIT issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 PIT issue

2,512件の閲覧回数
vignesh3
Contributor II
void clock_pll_init(void)
{
//select SOSC as input clock to the Micro controller
SCG->SOSCCFG |= (1 << 2);// need to check this bit
 
//select the pll source as SOSC
SCG->SPLLCFG |= (1 << 0);
 
//set PREDIV to zero no need to devide the pll input clk
SCG->SPLLCFG |= (0 << 8);
 
//multiply the input 8 Mhz by 45 to make clock as 360 Mhz
SCG->SPLLCFG |= (29 << 16);
 
//bydefault the PLL output clock is devided by 2
 
//select SPLL_CLK as system clock in run mode
SCG->RCCR |= (6 << 24);
 
//set the division factor for core clock and system clock core_clk = pllclock/1 = 180Mhz /1 - 180 Mhz
SCG->RCCR |= (0 << 16);
 
//bus_clk = core_clk / 2 = 180 Mhz / 2 = 90 Mhz
SCG->RCCR |= (1 << 4);
 
//flash_clk = core_clk / 6 = 180Mhz / 6 = 30Mhz
SCG->RCCR |= (5 << 0);
 
//SPLLDIV1_CLK = PLL_CLK / 2 = 180Mhz / 2 = 90Mhz
SCG->SPLLDIV |= (2 << 0);
 
//SPLLDIV2_CLK = PLL_CLK / 4 = 180Mhz / 4 = 45Mhz
SCG->SPLLDIV |= (3 << 8);
 
//note:SPLLDIV1_CLK,SPLLDIV2_CLK these two clk can be used for any peripheral
}
 
void gpioInit(void)
{
//enable clock for PORTD
PCC->PCCn[PCC_PORTD_INDEX] |= (1 << 30);
 
//select the PD0 as output pin
PTD->PDDR |= (1 << 0);
 
//select PD0 as GPIO from mux
PORTD->PCR[0] |= (1 << 8);
}
 
void pitChannelInit(void)
{
//select SPLLDIV2_CLK for LPIT peripheral
PCC->PCCn[PCC_LPIT_INDEX] |= (6 << 24);
 
//enable clock for LPIT
PCC->PCCn[PCC_LPIT_INDEX] |= (1 << 30);
 
//enable clock for LPIT0 module
LPIT0->MCR = 1;
 
//enable channel0 interrupt
LPIT0->MIER = 1;
 
//load time period value to the timer value register
LPIT0->TMR[0].TVAL = 45000000;
 
//enable the timer channel 0
LPIT0->TMR[0].TCTRL |= (1 << 0);
}
 
when I am executing LPIT0->TMR[0].TVAL = 45000000; it is showing "Break at address "0xdeadbeee" with no debug information available, or outside of program code." 
 
Can anyone tell me why I can not able to execute this line and what is the meaning of that note.

 

0 件の賞賛
返信
9 返答(返信)

2,162件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@vignesh3

Please refer to the attachment.

The hardware used is S32K144EVB and the IDE version is S32 Design Studio For Arm V2.2.


In fact, I couldn't compile your project from the beginning, and your code directly operated the registers without any instructions. I don't have time to help you check each register one by one, so I made a demo for your reference.

0 件の賞賛
返信

2,201件の閲覧回数
vignesh3
Contributor II

Hi @Senlent 

Still I am having the same issue can you try from your side, I am attaching the modified code here below.

 

0 件の賞賛
返信

2,402件の閲覧回数
vignesh3
Contributor II

Hi @Senlent take quick check from your side.

0 件の賞賛
返信

2,372件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@vignesh3

Your Lpit Module settings is no problem, but your clock setting is not right->clock_pll_init,

These clocks have exceeded the allowed threshold in run mode.

Senlent_0-1744622428813.png

 

0 件の賞賛
返信

2,368件の閲覧回数
vignesh3
Contributor II
Hi @Senlent,
I have checked in the RM but I could not able to find out clock threshold details.
Can you tell me where can I find these details in RM.
0 件の賞賛
返信

2,339件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@vignesh3

Please take a look at the chapter :"27.4 Internal clocking requirements" and we have application note AN5408 to give you a better understanding of this.

https://www.nxp.com/docs/en/application-note/AN5408.pdf

Aslo,we provided similar demo in S32 Design Studio for Arm V2.2, bare-metal demo code related to LPIT.

 

0 件の賞賛
返信

2,483件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi2vignesh3

This looks more like a debugger problem.

I took a quick look at your code and it seems like there is nothing wrong with it.

If you can reproduce the problem consistently, maybe you could tell me what debugger and

hardware you are using and provide your project.

 

0 件の賞賛
返信

2,412件の閲覧回数
vignesh3
Contributor II
Hi @Senlent I am using segger debugger with s32k144 development board still I am getting this issue can check it from your side.
0 件の賞賛
返信

2,407件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@vignesh3

yes,sure, please share your whole project , so that i can help you to check it on my side.

0 件の賞賛
返信