Part Number:MSP430F5529
Hello all,
如題,如何修改MSP430F5529 跑 TI-RTOS的時鐘(clock)從內部晶振改成外部晶振呢?
謝謝。
Yale Li:
我已经询问了相关工程师:
https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1215101/msp430f5529-let-device-using-external-crystal-oscillator-base-on-ti-rtos
,
Yale Li:
没有现成的TI-RTOS驱动来配置外置晶振。你需要使用MSP430 DriverLib(TI_RTOS也是使用的这个),或者在你代码的开头使用位域编程的方式写一个配置函数来配置晶振,可以参考这个:
https://dev.ti.com/tirex/explore/node?node=A__AIEuBajjFP7QMJ5ALqz1Xg__msp430ware__IOGqZri__LATEST
,
Zheng Wei Huang:
Hi Yale,
1. 我要怎麼確定在RTOS下,是有效根據XT1的? 而不是還是依據內部CLOCK(REFO的)呢?
P5SEL |= BIT4+BIT5; //P5.4和P5.5选择XT1晶振功能
UCSCTL3 |= SELREF_0; //设置FLL参考时钟源为XT1
UCSCTL4 |= SELA_0; //ACLK = XT1CLK
UCSCTL0 = 0; //设置DCO=MOD=0
do {
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
SFRIFG1 &= ~OFIFG;
}while(SFRIFG1&OFIFG);
UCSCTL6 &= ~XT1DRIVE_0;
__bis_SR_register(SCG0);
UCSCTL1 = DCORSEL_4;
UCSCTL2 |= 249;
__bic_SR_register(SCG0);
for(i = 50000;i>0;i–);
2. 另外在RTOS下,如果CLK不是設定8192000Hz,系統好像無法開機? 請問有辦法調整之類的嗎?
謝謝。
,
Yale Li:
好的,我跟进过去了
,
Yale Li:
请看一下相关工程师的回复:
1. For setting up the device, ignore TI-RTOS. That is for running specific tasks once the device is setup. Use this code example for setting up a LF xtal: https://dev.ti.com/tirex/explore/node?node=A__ALDSyPuzciqGUqasjmxBaQ__msp430ware__IOGqZri__LATEST
Keep in mind, your setup may vary from what's in the code depending on your hardware setup. In particular the load capacitance needed for the device. If you have external load caps, then you shouldn't enable the internal ones available for this device. For details on external load caps and balancing them for your crystal please see section 2.1 of the following app note: MSP 32-kHz Oscillators.
The while loop checking the DCO flags is what ensure the xtal is stable until it moves on. You can enable the interrupts associated with the xtals to be able to get informed if xtal failed and switched to REFO. My advice is to setup the device first w/o TI-RTOS integration and make sure you got the device operating how you want it, then integrate that setup in your TI-RTOS project.
2. Of course, Ti-RTOS expects a particular frequency, though you should be able to change it. I imagine you need to dive into the configuration file:
,
Zheng Wei Huang:
Hi Yale,
1. 目前已經可以將ACLK, MCLK, SMCLK的參考來源設定成XT1
2. 由於您提供的圖片不是很清楚,能否更詳盡的說明在哪可以修改TI-RTOS的frequency,改成非819200Hz,謝謝
,
Yale Li:
,
Zheng Wei Huang:
Hi Yale,
能否順便請教一下UART BSL,手上有一個MSP430F5529 Rev E的,這版本再進入UART BSL好像有問題,請問該如何解決?
謝謝
,
Yale Li:
Hello
如果有新的问题的话,请点击右上角的
或,
这样方便我们的识别及跟进,以提供更好的技术支持,谢谢。