Part Number: TM4C123GH6PM
Tool/software: Linux
my custom board use microcontroller TM4C123 had a XTAL 16MHz like TIVA launchpad. But i can not use it. My config:
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TM4C123GH6PM
Tool/software: Linux
my custom board use microcontroller TM4C123 had a XTAL 16MHz like TIVA launchpad. But i can not use it. My config:
Hello Minh,
I think your issue here is that you are telling the System Control that you are using a 16 MHz crystal:
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN);
Instead replace SYSCTL_XTAL_16MHZ with SYSCTL_XTAL_8MHZ so it recognizes you are using an 8 MHz crystal:
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_8MHZ | SYSCTL_OSC_MAIN);
oh I'm so sorry. I have some mistake in write down my thinking. I mean I use the XTAL 16Mhz. Thank for your help but my XTAL seem not work eventhough I try 4 different XTAL and 2 microcontroller TM4C123. The code work with Tiva launchpad but my board.
Hello Minh,
I don't think that's a code issue, it could be a hardware issue. Can you post schematic and also a picture of the MCU & XTAL so I can see how close they are etc.?
when i try
SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);
or others bigger, the code work at fist but suddenly stop after 1-2s.
but when i didn't use PLL,
SysCtlClockSet( SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN |SYSCTL_USE_OSC);
The code work well.
This is my schematic. is there a problem in schematic that affect the PLL?
Could you give me some idea, please.
Thank you.
Hello Minh,
According the datasheet for your crystal, the ECS-480-8-36-CKM is a 48 MHz crystal, not a 16 MHz crystal: https://www.ecsxtal.com/store/pdf/ECX-2236.pdf
See the Part Numbering section on the bottom of the first page.
See if you can get a 160 version of that crystal maybe.
Or from ECS we have tested the ECS-160-9-42-CKM-TR. It has a different package size though so you'd need to change your PCB a bit.
oh, I am sorry about the schematics make you misunderstanding. But I am sure that i used the 16Mhz XTAL not 48 Mhz.
I were a bit lazy when i made this board. so i use the 48Mhz and forgot to change the name of that XTAL.
i am apologize for my negligent.