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.

[参考译文] UCD3138128:如何更改 pflash 大小

Guru**** 2124380 points
Other Parts Discussed in Thread: UCD3138FW-BIDI
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1455731/ucd3138128-how-to-change-pflash-size

器件型号:UCD3138128
主题中讨论的其他器件:UCD3138FW-BIDI

工具与软件:

尊敬的  TI 专家:

参考项目:UCD3138FW-BIDI

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/948886/ccs-ucd3138128-how-to-configure-cmd-file-for-64k-flash-size?tisearch=e2e-sitesearch&keymatch=UCD3138128%20Flash%20size%2064#

我在上面的 URL 中找到了有关此问题的相关信息、但尚未对其进行测试。

我还有几个问题需要确认、如下:

1.当我修改相应的 pflash 容量设置为64KB 时、函数调用 clear_integrity_word (0)后的参数是否应该进行相应调整?

或者是否应该修改"software_interrupt"案例12中的 zoiw_address 参数? 请提供准确的操作说明。

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void rom_back_door(void)
{
// Call a SWI to clear the integrity words.
clear_integrity_word(0);
}
//==========================================================================================
// pmbus_write_rom_mode()
// Erases the program integrity word in FLASH, then waits for watchdog timer to reset the
// CPU. There is no return code or return from this function.
//==========================================================================================
int pmbus_write_rom_mode(void)
{
rom_back_door();
return PMBUS_SUCCESS; // Note: This line is never reached.
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2.使用 UCD3XXX GUI 工具进行编程时是否有任何具体注意事项? (例如:将闪存块复选框修改为"Block 0、1 64KB"?)

3.编程完成并重新上电后,从 ROM 切换到 pflash ,应该选择哪个选项?

谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Parrish、

    1. 由于您只扩展块0的大小而不是选择块2、因此您可以将 clear_integrity_word ()的参数保留为"0"。  
    2. 因此、您应该在 UCD3xxx 器件 GUI 中选择 Block 0、1 64KB 选项
    3. 在命令 ROM 执行其程序时、您可以在 GUI 中保持选择的默认块。

    此致、

    Jonathan Wong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jonathan:

    我在上一个链接中看到有人提到要修改校验和参数。
    您能否告知应在何处进行修改?
    我在下面粘贴的程序位置是否正确?

    zoow_address = 0x7ff8;(更改为0xfff8?)

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    case 12: // clear integrity words, depending on arg1
    #if (UCD3138128)
    //Note: This clear integrity word covers all cases. It is designed to clear integrity words based on what address the flash block is
    //mapped to when it is called. This is done for code which switches blocks. And it can erase the integrity word at the end of each of 4 blocks.
    //
    //For most applications, it can be simplified considerably if code space is scarce
    //
    //
    {
    register Uint32 * program_index = (Uint32 *) program_area; //store destination address for program
    register Uint32 * source_index = (Uint32 *) zero_out_integrity_double_word; //Used for source address of PFLASH;
    register Uint32 counter;
    if(arg1 == 0) //0 means first block in memory, regardless of which block that is;
    {
    zoiw_address = 0x7ff8;
    if((DecRegs.MFBALR1.bit.ADDRESS == 0) && (DecRegs.MFBAHR1.bit.ADDRESS == 0)) //here if flash block 0 is at 0
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Parrish、

    我将在星期一回复。 感谢您的耐心。

    此致、

    Jonathan Wong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Parrish、

    Fusion Digital Power Studio 用户指南 中的第5.2.1节介绍了如何配置 UCD3xxx 器件 GUI 以刷写多个块。

    是的、是这样。 您可以在 interrupt.c 文件中更改 zojw_address = 0xfff8。

    此致、

    Jonathan Wong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Jonathan:

    让我总结一下:

    1. 当修改.cmd 文件以将内存大小设置为64KB 时、案例12中的 zoj_address:if (arg1 = 0)也必须更新为 zoj_address = 0xfff8。

      Fullscreen
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      case 12: // clear integrity words, depending on arg1
      #if (UCD3138128)
      //Note: This clear integrity word covers all cases. It is designed to clear integrity words based on what address the flash block is
      //mapped to when it is called. This is done for code which switches blocks. And it can erase the integrity word at the end of each of 4 blocks.
      //
      //For most applications, it can be simplified considerably if code space is scarce
      //
      //
      {
      register Uint32 * program_index = (Uint32 *) program_area; //store destination address for program
      register Uint32 * source_index = (Uint32 *) zero_out_integrity_double_word; //Used for source address of PFLASH;
      register Uint32 counter;
      if(arg1 == 0) //0 means first block in memory, regardless of which block that is;
      {
      zoiw_address = 0x7ff8; //=> need to change 0xfff8
      if((DecRegs.MFBALR1.bit.ADDRESS == 0) && (DecRegs.MFBAHR1.bit.ADDRESS == 0)) //here if flash block 0 is at 0
      {
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    2. 在刷写过程中、在 UCD3xxx 器件 GUI 中选择"Block 0、1 64KB"选项。

    3. 刷写后、要从 ROM 跳到 pflash、请选择默认 Block 选项。

    是这样吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Parrish、

    是的、您的总结正确。  

    您是否要将存储器从4x 32kB 更改为2x 64kB 程序闪存? 如果是、则可能需要注释掉 if (arg1 = 2)和  if (arg1 = 3)案例、并在  if (arg1 = 1)中更改 zoj_address = 1fff8

    此致、

    Jonathan Wong