Feb 07, 2020
07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2020
07:38 AM
Hello,
I am trying to use the external clock where I configure the register and relavant pin according to the requirement but the clock is not produced as expected.
using TC277 micro.
clear safety()
Extcon.B.EN0 = 1;
Extcon.B.SEL0 = 0x9;using fspb source
Extcon.B.NSEL = 1;
Set safety()
IfxPort_setPinMode(PINOUT, IfxPort_Mode_outputPushPullAlt6); PINOUT is defined to be P23,1
IfxPort_setPinPadDriver(PINOUT, IfxPort_PadDriver_cmosAutomotiveSpeed1);
Kindly shed some light, what else I am missing to initialise.
Thank you in advance.
Deepak
I am trying to use the external clock where I configure the register and relavant pin according to the requirement but the clock is not produced as expected.
using TC277 micro.
clear safety()
Extcon.B.EN0 = 1;
Extcon.B.SEL0 = 0x9;using fspb source
Extcon.B.NSEL = 1;
Set safety()
IfxPort_setPinMode(PINOUT, IfxPort_Mode_outputPushPullAlt6); PINOUT is defined to be P23,1
IfxPort_setPinPadDriver(PINOUT, IfxPort_PadDriver_cmosAutomotiveSpeed1);
Kindly shed some light, what else I am missing to initialise.
Thank you in advance.
Deepak
- Tags:
- IFX
6 Replies
Feb 07, 2020
09:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2020
09:40 AM
Hi Deepak. Try doing EN0 last instead of first.
Also, IfxPort_setPinPadDriver should be inside an ENDINIT (not Safety ENDINIT) protection clear/set sequence.
Are you seeing anything on the output? Putting fSPB out directly is probably too fast on an MP+ pad: the datasheet lists 4.5 ns max rise/fall time. I would expect something vaguely sine-wavy instead of a square wave.
Have you tried it with a divider in FDR?
Also, IfxPort_setPinPadDriver should be inside an ENDINIT (not Safety ENDINIT) protection clear/set sequence.
Are you seeing anything on the output? Putting fSPB out directly is probably too fast on an MP+ pad: the datasheet lists 4.5 ns max rise/fall time. I would expect something vaguely sine-wavy instead of a square wave.
Have you tried it with a divider in FDR?
Feb 07, 2020
10:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2020
10:39 AM
You need a good quality scope to see this signal at the pin assuming the fSPB = 100MHz.
Feb 09, 2020
02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 09, 2020
02:56 PM
Hello,
Thank you for the replies.
1) I have tried by setting EN0 register value after SEL0 with FDR and my code look as below
IfxScuWdt_clearSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());
Extcon.B.SEL0 = 0x1;
Extcon.B.EN0 = 1;
Extcon.B.NSEL = 1;
SCU_FDR.B.STEP = 0x3CE; /* Set FDR step */
SCU_FDR.B.DM = 1; /* Set divider mode to normal */
IfxPort_setPinPadDriver(PINOUT, 0);
IfxScuWdt_setSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());
I cannot see any output from the desired pin. I am using Picoscope which is capable of measuring bandwidth upto 200Mhz.
Kindly shed some light as I am missing something here.
Deepak
Thank you for the replies.
1) I have tried by setting EN0 register value after SEL0 with FDR and my code look as below
IfxScuWdt_clearSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());
Extcon.B.SEL0 = 0x1;
Extcon.B.EN0 = 1;
Extcon.B.NSEL = 1;
SCU_FDR.B.STEP = 0x3CE; /* Set FDR step */
SCU_FDR.B.DM = 1; /* Set divider mode to normal */
IfxPort_setPinPadDriver(PINOUT, 0);
IfxScuWdt_setSafetyEndinitInline(IfxScuWdt_getSafetyWatchdogPasswordInline());
I cannot see any output from the desired pin. I am using Picoscope which is capable of measuring bandwidth upto 200Mhz.
Kindly shed some light as I am missing something here.
Deepak
Feb 10, 2020
02:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2020
02:44 AM
hello Guys,
It worked, I used IfxScuWdt_clearSafetyEndinit(IfxScuWdt_getSafetyWa tchdogPassword()); as cwunder(Chris) said and now I can able to gerate a clock frequency.
I am trying to figure out FDR STEP calculation for generation ~30 MHz from fSPB = 100 Mhz.
Kindly shed some light.
Thank you guys for your support.
Deepak
It worked, I used IfxScuWdt_clearSafetyEndinit(IfxScuWdt_getSafetyWa tchdogPassword()); as cwunder(Chris) said and now I can able to gerate a clock frequency.
I am trying to figure out FDR STEP calculation for generation ~30 MHz from fSPB = 100 Mhz.
Kindly shed some light.
Thank you guys for your support.
Deepak
Feb 10, 2020
07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2020
07:22 AM
Hi Deepak. See formula 7.24 on page 467 of TC27xD_um_v2.2.pdf for Normal Divider Mode, and formula 7.25 for Fractional Divider Mode.
In Normal Divider Mode:
FDR.STEP=1023 => 50 MHz
FDR.STEP=1022 => 25 MHz
In Fractional Divider Mode, it's important to note that the logic runs at 100 MHz, so this part of the user manual is very important:
In Fractional Divider Mode:
FDR.STEP=683 => 33.35 MHz (with an irregular duty cycle and period)
FDR.STEP=512 => 25 MHz (40 ns period)
FDR.STEP=256 => 12.5 MHz (80 ns period)
In Normal Divider Mode:
FDR.STEP=1023 => 50 MHz
FDR.STEP=1022 => 25 MHz
In Fractional Divider Mode, it's important to note that the logic runs at 100 MHz, so this part of the user manual is very important:
Note that in Fractional Divider Mode the clock fOUT can have a maximum period jitter of one fSPB clock period.
In Fractional Divider Mode:
FDR.STEP=683 => 33.35 MHz (with an irregular duty cycle and period)
FDR.STEP=512 => 25 MHz (40 ns period)
FDR.STEP=256 => 12.5 MHz (80 ns period)
Feb 11, 2020
03:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 11, 2020
03:44 PM
Thank you guys(UC_wrnagler and Chris) for the detailed explanation, finally everything works.