ST意法半导体
直播中

尹丽

8年用户 200经验值
私信 关注
[问答]

SPC564Axx OS-Less测试应用程序无法在开发板上运行

大家好,



我无法让示例应用程序在开发板上运行。


建立:
1. SPC56xxMB / XPC56xxMB(根据原理图相同)
2. SPC564AADPT324S / XPC564AADPT324S(根据原理图也相同)


问题:
1. LED不闪烁
2.使用BDM调试器(P& E Micro USB Multilink PPC Nexus)我可以看到SIU.PCR和eMIOS.CCR寄存器配置不正确。事实上,它们似乎具有默认值。我实际上在CodeWarrior下的这个板上运行了我自己的应用程序,所以我知道该板工作正常,SIU.PCR和eMIOS.CCR值应该是正确的。


观察:
我想知道问题是否在芯片配置中。我收到的电路板带有MPC5644A / SPC564A80B4。 (为了让它更加混乱,似乎飞思卡尔刚刚将部件号更改为SPC5644A!)
在platform.h中定义了_SPC564A70L7_,并且在application.ld中,对于564A80B4,MEMORY指令不正确。但是,将它们更改为564A80B4的值并没有帮助。


如果芯片配置是问题,我很乐意尝试纠正它,如果有人可以指出我,至少在一般方向,应该修改的文件。我仍然没有足够的经验与SPC5 Studio的做事方式自己找到一切。


当然它可能是其他所有东西:)
干杯


凯文

以上来自于谷歌翻译


以下为原文




Hi All,



I am unable to get the sample application to run on the dev board.


Setup:  
1. SPC56xxMB/XPC56xxMB (they are identical according to the schematics)
2. SPC564AADPT324S/XPC564AADPT324S (they also are identical according to the schematics)


Problem:
1. LEDs do not flash
2. Using the BDM debugger (P&E Micro USB Multilink PPC Nexus) I can see that the SIU.PCR and eMIOS.CCR registers are not configured correctly. In fact they appear to have the default values in them. I actually have my own app running on this board under CodeWarrior so I know that the board works and what the correct SIU.PCR and eMIOS.CCR values should be.


Observations:
I am wondering if the problem is in the chip configuration. The board I received came with a MPC5644A/SPC564A80B4. (To make it even more confusing, it seems that Freescale has just changed the part number on their part to SPC5644A!)
In platform.h  _SPC564A70L7_ is defined and in application.ld the MEMORY directive is incorrect for the 564A80B4. However, changing them to values for the 564A80B4 did not help.


If the chip config is the problem I would be glad to try and correct it if someone can point me, at least in the general direction, of the files that should be modified. I am still just not experienced enough with the SPC5 Studio way of doing things to find everything by myself.


Of course it may be something else all together:)
Cheers


Kevin

回帖(10)

刘京

2018-11-23 10:46:24
嗨,
 
 
 我可以确认SPC564A70设备有问题。演示使用SPC560A80设备正常工作。该错误已在SPC5-HAL存储库中修复:https://sourceforge.net/projects/spc5-hal/
 
 如果要修补SPC4Studio 1.1安装,请在C: SPC5Studio  eclipse  plugins  org.chibios.spc5.components.hal.platform.spc564axx _....  component  lib  src 下找到文件hal_lld.c
 然后注释掉FLASH_B和XBAR的初始化如下:
 
 // FLASH_B.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
 // FLASH_B.BIUCR2.R = 0;
 
 // XBAR.MPR0.R = 0x34000021;
 // XBAR.MPR2.R = 0x34000021;
 
 该问题将在SPC5Studio的下一个更新包(6月底)中修复。
 
 乔瓦尼

以上来自于谷歌翻译


以下为原文





Hi,


I can confirm that there is a problem with SPC564A70 devices. The demos work correctly using SPC560A80 devices. The bug has already been fixed on the SPC5-HAL repository: https://sourceforge.net/projects/spc5-hal/

If you want to patch your SPC4Studio 1.1 installation find the file hal_lld.c under C:SPC5Studioeclipsepluginsorg.chibios.spc5.components.hal.platform.spc564axx_....componentlibsrc
then comment out the initialization of FLASH_B and XBAR as follow:

//  FLASH_B.BIUCR.R  = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
//  FLASH_B.BIUCR2.R = 0;

//  XBAR.MPR0.R = 0x34000021;
//  XBAR.MPR2.R = 0x34000021;

The problem will be fixed in the next update pack for SPC5Studio (end of June).

Giovanni
举报

尹丽

2018-11-23 10:52:50
嗨Giovanni,
 
 
我评论了你推荐的那些行。 LED仍然不闪烁或发光。
 
我在代码中找不到SIU.PCR和eMIOS.CCR寄存器设置为点亮LED所需的值的任何地方。到目前为止,我唯一能找到的是pal_lld.c,其中在init期间,所有SIU.PCR寄存器都设置为默认值。我无法找到配置或设置eMIOS线路的任何地方。
 
根据56xxMB原理图,主板上的4个LED是eMIOS 9,10,11,12。这相当于SIU.PCR [188-191] .R。这些寄存器的正确值应为0x0600。
EMIOS.CH [9] .CCR.R = 0x00000001和EMIOS.CH [10] .CCR.R = 0x00000081打开LED并分别关闭LED。
 
你能告诉我哪些文件进行初始化并设置SIU和eMIOS模块的值?

以上来自于谷歌翻译


以下为原文





Hi  Giovanni,


I commented out the lines that you recommended. The LEDs still do not flash or light.

I cannot find anywhere in the code where the SIU.PCR and eMIOS.CCR registers are set to the values necessary to light the LEDs. The only thing that I have been able to find so far is in pal_lld.c where during init all of the SIU.PCR registers are set to a default value. I have been unable to find anywhere that the eMIOS lines are configured or set.

According to the 56xxMB schematics, the 4 LEDs on the motherboard are eMIOS 9,10, 11,12. This corresponds to SIU.PCR[188-191].R. The correct value of these registers should be 0x0600.  
EMIOS.CH[9].CCR.R = 0x00000001 and EMIOS.CH[10].CCR.R = 0x00000081 turns on the LEDs and turns off the LEDs respectively.

Can you tell me which files do the initialization and set the values for the SIU and eMIOS modules?
举报

袁钧质

2018-11-23 11:11:15
嗨凯文,
 
 
 我只是在完成这些更改之后在SPC5Studio 1.1中重新测试了该应用程序并且它可以工作。您的电路板是否可能未配置为点亮LED?看看跳线组J7,那些都应该插入。
 
 关于演示,LED闪烁不是使用EMIOS完成的,而是使用引脚的GPIO模式。引脚在Board Component中配置,默认值生成(来自Eclipse项目资源管理器)组件/ spc5_hal_spc564axx_hal_board_initialization_component / cfg / board.c
 
 执行PCR初始化的代码是您已经找到的pal_lld.c中的函数,该函数读取board.c中生成的设置。
 
 关于EMIOS,它将由版本1.2中的PWM和ICU驱动程序处理。
 
 再见,
 乔瓦尼

以上来自于谷歌翻译


以下为原文





Hi Kevin,


I just re-tested the application in SPC5Studio 1.1 after doing those changes and it works. Is it possible that your board is not configured to light the LEDs? look at the jumpers group J7, those should all be inserted.

About the demo, the LED flashing is not done using EMIOS but the GPIO mode of the pins. The pins are configured in the Board Component, the default values are generated into (from the Eclipse project explorer) components/spc5_hal_spc564axx_hal_board_initialization_component/cfg/board.c

The code performing the PCR initialization is that function in pal_lld.c that you already found, that function reads the settings generated in board.c.

About the EMIOS, it will be handled by the PWM and ICU drivers that will be present in version 1.2.

ciao,
Giovanni
举报

尹丽

2018-11-23 11:22:14
嗨Giovanni
 
 
首先,我要感谢你给予的所有帮助,我希望我的问题足够通用,可以帮助他人。
 
仍然无法使无操作系统的测试应用程序工作。在我编写的裸板应用程序中,LED正常亮起,所有电路板跳线配置都是出厂默认设置。
 
测试应用程序在启动序列中很早就失败了。使用内置的CodeWarrior调试器,我必须承认我完全不熟悉,我可以看到程序计数器(PC)停在0x42。这只是程序中的8或9条指令。当PC到达该点时,LC寄存器显示0x0badbad0。进一步强制PC,使用CW可以执行的操作会导致CTR和XER报告运行时错误。
 
似乎编译器没有为我的设置生成正确的代码。
 
几个问题;
1.测试应用程序是否使用VLE或BookE进行编译?
2.回想一下,我有MPC5644A / SPC564A80B4,而不是SPC564A70。这会导致问题吗?
3.由于我实际拥有MPC5644A,因此读取SIU.MIDR会将芯片报告为“MPC5644A掩模10”。这会导致问题吗?
 
再次感谢您的帮助,我真的很想开始运行,因为我非常渴望尝试使用ChibiOS。

以上来自于谷歌翻译


以下为原文





Hi Giovanni


First, let me thank you for all the help you have given, I hope that my questions are generic enough to be of help to others.

Still cannot get the OS-less test app to work. The LEDs light up properly in the bareboard application that I wrote and all of the board jumper configs are the factory defaults.  

The test app is failing very early in the boot sequence. Using the built-in CodeWarrior debugger, which I must confess I am completely unfamiliar with, I can see that the Program Counter (PC) stops at 0x42. This is only 8 or 9 instructions into the program. When the PC reaches that point, the LC register shows 0x0badbad0. Forcing the PC further, something that you can do with CW, causes CTR and XER to report runtime errors.

It seems that the compiler is not producing the correct code for my setup.

A few questions;
1. Is the test app compiling with VLE or BookE?
2. Recall that I have the MPC5644A/SPC564A80B4, not the SPC564A70. Could this be causing a problem?
3. Since I actually have the MPC5644A, reading SIU.MIDR will report back the chip as 'MPC5644A mask 10'. Could this be causing a problem?

Thanks again for all your help, I really would like to get this up and running as I am quite anxious to try ChibiOS.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分