AURIX TC397 Flash编程

2023-05-16

目录

    • Flash编程基础知识
    • Flash Programming
    • 微信公众号

Flash编程基础知识

参考 Flash_Programming_1 for KIT_AURIX_TC397_TFT, 本例展示了如何烧写PFLASH(Program Flash memory) 和 DFLASH(Data Flash memory).

  • 数据存储单元(DMU, Data Memory Unit)控制执行在PFLASH和DFLASH上的命令序列, 连接FSI(Flash Standard Interface)和PFI(Programming Flash Interface).
  • FSI在所有闪存上执行擦除, 编程和验证操作.
  • PFI为每个PFLASH块与CPU提供唯一的点对点快速连接
  • TC39x 提供 6 Program Flash Banks(PFx) 和 2 Data Flash Banks(DFx)
  • TC3xx 具有相同扇区结构的PFLASH块PFx, PFx块大小可能不用: 3/2/1 Mbyte Program Flash Bank
  • TC39x 有5个3MB大小的PFx(PF0…PF4) 和 1个1MB大小的PF5. 每个PFx被划分为1024KB大小的物理扇区(Physical Sectors), 每个物理扇区又被划分为16KB大小的逻辑扇区(Logical Sectors)
  • TC39x具有两个数据闪存存储区DFLASH0和DFLASH1, 两者都包括多个通常用于EEPROM仿真的EEPROM扇区. 仅DFLASH0包含用于数据保护的用户配置块(UCBs, User Configuration Blocks)和1个配置扇区(CFS, Configuration Sector), 用户无法直接访问该配置扇区.
  • DFLASH EEPROM可以配置为单端模式(默认)或补码检测(incomplement sensing). 根据所选模式, 每个扇区的大小分别设置为4KB和2KB
  • 闪存中可以编程的最小数据量是页(Page), 程序闪存(Program Flash)页由32字节组成, 数据闪存(Data Flash)页由8字节组成
  • 仅在擦除操作后才能对页面进行编程
  • 可以执行擦除操作的最小单元是逻辑扇区(Logical Sector)

TC39x Program Flash Memeory:

在这里插入图片描述

TC39x Data Flash memory:

在这里插入图片描述

所有闪存操作均通过命令序列执行, DMU具有命令序列解释器(CSI, Command Sequence Interpreter)来处理命令序列, 用于对程序闪存或数据闪存进行编程的最小命令序列如下:

  • 擦除逻辑扇区待编程
  • 等待直到闪存就绪(不忙)
  • 进入页面模式
  • 等待直到闪存就绪(不忙)
  • 加载要写入页面的数据
  • 写页面
  • 等待直到闪存内存已准备就绪(不忙)

注:执行PFLASH编程或擦除的代码不应从同一PFLASH执行

PF0…PF5的地址映射为:

Address RangeSizeDescriptionReadWrite
A000 0000H - A02F FFFFH3 MbyteProgram Flash 0 (PF0)AccessSRIBE
A030 0000H - A05F FFFFH3 MbyteProgram Flash 1 (PF1)AccessSRIBE
A060 0000H - A08F FFFFH3 MbyteProgram Flash 2 (PF2)AccessSRIBE
A090 0000H - A0BF FFFFH3 MbyteProgram Flash 3 (PF3)AccessSRIBE
A0C0 0000H - A0EF FFFFH3 MbyteProgram Flash 4 (PF4)AccessSRIBE
A0F0 0000H - A0FF FFFFH1 MbyteProgram Flash 5 (PF5)AccessSRIBE

其中, SRIBE: A bus access is terminated with a bus error on the SRI(SRI上的总线错误终止总线访问)

DF0…DF1的地址映射为:

Address RangeSizeDescriptionReadWrite
AF00 0000H - AF0F FFFFH1 MbyteData Flash 0 EEPROM (DF0) Host Comd. Sequence InterpreterAccessAccess 1)
AF10 0000H - AF3F FFFFH3 MbyteReservedSRIBESRIBE
AF40 0000H - AF40 5FFFH24 KbyteData Flash 0 UCB (DF0)AccessSRIBE
AF40 6000H - AF7F FFFFH-ReservedSRIBESRIBE
AF80 0000H - AF80 FFFFH64 KbyteData Flash 0 CFS (DF0)AccessSRIBE
AF81 0000H - AFBF FFFFH-ReservedSRIBESRIBE
AFC0 0000H - AFC1 FFFFH128 KbyteData Flash 1 EEPROM (DF1) HSM Comd. Sequence InterpreterAccessAccess 2)

其中:

    1. Host Command Sequence Interpreter(主机命令序列解释器)
    1. HSM Command Sequence Interpreter(HSM命令序列解释器)

Flash Programming

直接搬运官方的例程来看, 此例中, 程序闪存(PFLASH)的64个字节随后被烧写并验证. 此外, 烧写并验证了64字节的数据闪存(DFLASH). 在进行任何写操作之前, 将擦除闪存, 如果闪存烧写并验证成功, 则将打开每个测试内存的LED.

闪存中可以编程的最小数据量是页(Page), 程序闪存(Program Flash)页由32字节组成, 数据闪存(Data Flash)页由8字节组成, 所以64字节对应PFLASH的2页, DFLASH的8页.

Cpu0_Main.c 代码如下:

#include "Ifx_Types.h"
#include "IfxCpu.h"
#include "IfxScuWdt.h"

IFX_ALIGN(4) IfxCpu_syncEvent g_cpuSyncEvent = 0;

#include <string.h>
#include "Ifx_Types.h"
#include "IfxFlash.h"
#include "IfxCpu.h"

void initLEDs(void);            /* Function that initializes the LEDs                                               */
void writeProgramFlash(void);   /* Function that flashes the Program Flash memory calling the routines from the PSPR*/
void writeDataFlash(void);      /* Function that flashes the Data Flash memory                                      */
void verifyProgramFlash(void);  /* Function that verifies the data written in the Program Flash memory              */
void verifyDataFlash(void);     /* Function that verifies the data written in the Data Flash memory                 */

#define PFLASH_PAGE_LENGTH          IFXFLASH_PFLASH_PAGE_LENGTH /* 0x20 = 32 Bytes (smallest unit that can be
                                                                 * programmed in the Program Flash memory (PFLASH)) */
#define DFLASH_PAGE_LENGTH          IFXFLASH_DFLASH_PAGE_LENGTH /* 0x8 = 8 Bytes (smallest unit that can be
                                                                 * programmed in the Data Flash memory (DFLASH))    */
#define FLASH_MODULE                0                           /* Macro to select the flash (PMU) module           */
#define PROGRAM_FLASH_0             IfxFlash_FlashType_P0       /* Define the Program Flash Bank to be used         */
#define DATA_FLASH_0                IfxFlash_FlashType_D0       /* Define the Data Flash Bank to be used            */

#define DATA_TO_WRITE               0x07738135                  /* Dummy data to be written into the Flash memories */

#define PFLASH_STARTING_ADDRESS     0xA00E0000                  /* Address of the PFLASH where the data is written  */
#define DFLASH_STARTING_ADDRESS     0xAF000000                  /* Address of the DFLASH where the data is written  */

#define PFLASH_NUM_PAGE_TO_FLASH    2                           /* Number of pages to flash in the PFLASH           */
#define PFLASH_NUM_SECTORS          1                           /* Number of PFLASH sectors to be erased            */
#define DFLASH_NUM_PAGE_TO_FLASH    8                           /* Number of pages to flash in the DFLASH           */
#define DFLASH_NUM_SECTORS          1                           /* Number of DFLASH sectors to be erased            */

/* Reserved space for erase and program routines in bytes */
#define ERASESECTOR_LEN             (100)
#define WAITUNBUSY_LEN              (100)
#define ENTERPAGEMODE_LEN           (100)
#define LOADPAGE2X32_LEN            (100)
#define WRITEPAGE_LEN               (100)
#define ERASEPFLASH_LEN             (0x100)
#define WRITEPFLASH_LEN             (0x200)

/* Relocation address for the erase and program routines: Program Scratch-Pad SRAM (PSPR) of CPU0 */
#define RELOCATION_START_ADDR       (0x70100000U)

/* Definition of the addresses where to relocate the erase and program routines, given their reserved space */
#define ERASESECTOR_ADDR            (RELOCATION_START_ADDR)
#define WAITUNBUSY_ADDR             (ERASESECTOR_ADDR + ERASESECTOR_LEN)
#define ENTERPAGEMODE_ADDR          (WAITUNBUSY_ADDR + WAITUNBUSY_LEN)
#define LOAD2X32_ADDR               (ENTERPAGEMODE_ADDR + ENTERPAGEMODE_LEN)
#define WRITEPAGE_ADDR              (LOAD2X32_ADDR + LOADPAGE2X32_LEN)
#define ERASEPFLASH_ADDR            (WRITEPAGE_ADDR + WRITEPAGE_LEN)
#define WRITEPFLASH_ADDR            (ERASEPFLASH_ADDR + ERASEPFLASH_LEN)

/* Definition of the LEDs port pins */
#define LED1                        &MODULE_P13,0               /* LED connected to Port 13, Pin 0                  */
#define LED2                        &MODULE_P13,1               /* LED connected to Port 13, Pin 1                  */

#define MEM(address)                *((uint32 *)(address))      /* Macro to simplify the access to a memory address */

/*********************************************************************************************************************/
/*------------------------------------------------Function Prototypes------------------------------------------------*/
/*********************************************************************************************************************/
void erasePFLASH(uint32 sectorAddr);
void writePFLASH(uint32 startingAddr);
void copyFunctionsToPSPR(void);

typedef struct
{
    void (*eraseSectors)(uint32 sectorAddr, uint32 numSector);
    uint8 (*waitUnbusy)(uint32 flash, IfxFlash_FlashType flashType);
    uint8 (*enterPageMode)(uint32 pageAddr);
    void (*load2X32bits)(uint32 pageAddr, uint32 wordL, uint32 wordU);
    void (*writePage)(uint32 pageAddr);
    void (*eraseFlash)(uint32 sectorAddr);
    void (*writeFlash)(uint32 startingAddr);
} Function;

/*********************************************************************************************************************/
/*-------------------------------------------------Global variables--------------------------------------------------*/
/*********************************************************************************************************************/
Function g_commandFromPSPR;

/*********************************************************************************************************************/
/*---------------------------------------------Function Implementations----------------------------------------------*/
/*********************************************************************************************************************/
/* Function to initialize the LEDs */
void initLEDs()
{
    /* Configure LED1 and LED2 port pins */
    IfxPort_setPinMode(LED1, IfxPort_Mode_outputPushPullGeneral);
    IfxPort_setPinMode(LED2, IfxPort_Mode_outputPushPullGeneral);

    /* Turn off the LEDs (LEDs are low-level active) */
    IfxPort_setPinState(LED1, IfxPort_State_high);
    IfxPort_setPinState(LED2, IfxPort_State_high);
}

/* This function copies the erase and program routines to the Program Scratch-Pad SRAM (PSPR) of the CPU0 and assigns
 * function pointers to them.
 */
void copyFunctionsToPSPR()
{
    /* Copy the IfxFlash_eraseMultipleSectors() routine and assign it to a function pointer */
    memcpy((void *)ERASESECTOR_ADDR, (const void *)IfxFlash_eraseMultipleSectors, ERASESECTOR_LEN);
    g_commandFromPSPR.eraseSectors = (void *)ERASESECTOR_ADDR;

    /* Copy the IfxFlash_waitUnbusy() routine and assign it to a function pointer */
    memcpy((void *)WAITUNBUSY_ADDR, (const void *)IfxFlash_waitUnbusy, WAITUNBUSY_LEN);
    g_commandFromPSPR.waitUnbusy = (void *)WAITUNBUSY_ADDR;

    /* Copy the IfxFlash_enterPageMode() routine and assign it to a function pointer */
    memcpy((void *)ENTERPAGEMODE_ADDR, (const void *)IfxFlash_enterPageMode, ENTERPAGEMODE_LEN);
    g_commandFromPSPR.enterPageMode = (void *)ENTERPAGEMODE_ADDR;

    /* Copy the IfxFlash_loadPage2X32() routine and assign it to a function pointer */
    memcpy((void *)LOAD2X32_ADDR, (const void *)IfxFlash_loadPage2X32, LOADPAGE2X32_LEN);
    g_commandFromPSPR.load2X32bits = (void *)LOAD2X32_ADDR;

    /* Copy the IfxFlash_writePage() routine and assign it to a function pointer */
    memcpy((void *)WRITEPAGE_ADDR, (const void *)IfxFlash_writePage, WRITEPAGE_LEN);
    g_commandFromPSPR.writePage = (void *)WRITEPAGE_ADDR;

    /* Copy the erasePFLASH() routine and assign it to a function pointer */
    memcpy((void *)ERASEPFLASH_ADDR, (const void *)erasePFLASH, ERASEPFLASH_LEN);
    g_commandFromPSPR.eraseFlash = (void *)ERASEPFLASH_ADDR;

    /* Copy the erasePFLASH() routine and assign it to a function pointer */
    memcpy((void *)WRITEPFLASH_ADDR, (const void *)writePFLASH, WRITEPFLASH_LEN);
    g_commandFromPSPR.writeFlash = (void *)WRITEPFLASH_ADDR;
}

/* This function erases a given sector of the Program Flash memory. The function is copied in the PSPR through
 * copyFunctionsToPSPR(). Because of this, inside the function, only routines from the PSPR or inline functions
 * can be called, otherwise a Context Type (CTYP) trap can be triggered.
 */
void erasePFLASH(uint32 sectorAddr)
{
    /* Get the current password of the Safety WatchDog module */
    uint16 endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPasswordInline();

    /* Erase the sector */
    IfxScuWdt_clearSafetyEndinitInline(endInitSafetyPassword);      /* Disable EndInit protection                   */
    g_commandFromPSPR.eraseSectors(sectorAddr, PFLASH_NUM_SECTORS); /* Erase the given sector                       */
    IfxScuWdt_setSafetyEndinitInline(endInitSafetyPassword);        /* Enable EndInit protection                    */

    /* Wait until the sector is erased */
    g_commandFromPSPR.waitUnbusy(FLASH_MODULE, PROGRAM_FLASH_0);
}

/* This function writes the Program Flash memory. The function is copied in the PSPR through copyFunctionsToPSPR().
 * Because of this, inside the function, only routines from the PSPR or inline functions can be called,
 * otherwise a Context Type (CTYP) trap can be triggered.
 */
void writePFLASH(uint32 startingAddr)
{
    uint32 page;                                                /* Variable to cycle over all the pages             */
    uint32 offset;                                              /* Variable to cycle over all the words in a page   */

    /* Get the current password of the Safety WatchDog module */
    uint16 endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPasswordInline();

    /* Write all the pages */
    for(page = 0; page < PFLASH_NUM_PAGE_TO_FLASH; page++)              /* Loop over all the pages                  */
    {
        uint32 pageAddr = startingAddr + (page * PFLASH_PAGE_LENGTH);   /* Get the address of the page              */

        /* Enter in page mode */
        g_commandFromPSPR.enterPageMode(pageAddr);

        /* Wait until page mode is entered */
        g_commandFromPSPR.waitUnbusy(FLASH_MODULE, PROGRAM_FLASH_0);

        /* Write 32 bytes (8 double words) into the assembly buffer */
        for(offset = 0; offset < PFLASH_PAGE_LENGTH; offset += 0x8)     /* Loop over the page length                */
        {
            g_commandFromPSPR.load2X32bits(pageAddr, DATA_TO_WRITE, DATA_TO_WRITE); /* Load 2 words of 32 bits each */
        }

        /* Write the page */
        IfxScuWdt_clearSafetyEndinitInline(endInitSafetyPassword);      /* Disable EndInit protection               */
        g_commandFromPSPR.writePage(pageAddr);                          /* Write the page                           */
        IfxScuWdt_setSafetyEndinitInline(endInitSafetyPassword);        /* Enable EndInit protection                */

        /* Wait until the page is written in the Program Flash memory */
        g_commandFromPSPR.waitUnbusy(FLASH_MODULE, PROGRAM_FLASH_0);
    }
}

/* This function flashes the Program Flash memory calling the routines from the PSPR */
void writeProgramFlash()
{
    boolean interruptState = IfxCpu_disableInterrupts(); /* Get the current state of the interrupts and disable them*/

    /* Copy all the needed functions to the PSPR memory to avoid overwriting them during the flash execution */
    copyFunctionsToPSPR();

    /* Erase the Program Flash sector before writing */
    g_commandFromPSPR.eraseFlash(PFLASH_STARTING_ADDRESS);

    /* Write the Program Flash */
    g_commandFromPSPR.writeFlash(PFLASH_STARTING_ADDRESS);

    IfxCpu_restoreInterrupts(interruptState);            /* Restore the interrupts state                            */
}

/* This function verifies if the data has been correctly written in the Program Flash */
void verifyProgramFlash()
{
    uint32 page;                                                /* Variable to cycle over all the pages             */
    uint32 offset;                                              /* Variable to cycle over all the words in a page   */
    uint32 errors = 0;                                          /* Variable to keep record of the errors            */

    /* Verify the written data */
    for(page = 0; page < PFLASH_NUM_PAGE_TO_FLASH; page++)                          /* Loop over all the pages      */
    {
        uint32 pageAddr = PFLASH_STARTING_ADDRESS + (page * PFLASH_PAGE_LENGTH);    /* Get the address of the page  */

        for(offset = 0; offset < PFLASH_PAGE_LENGTH; offset += 0x4)                 /* Loop over the page length    */
        {
            /* Check if the data in the Program Flash is correct */
            if(MEM(pageAddr + offset) != DATA_TO_WRITE)
            {
                /* If not, count the found errors */
                errors++;
            }
        }
    }

    /* If the data is correct, turn on the LED1 */
    if(errors == 0)
    {
        IfxPort_setPinState(LED1, IfxPort_State_low);
    }
}

/* This function flashes the Data Flash memory.
 * It is not needed to run this function from the PSPR, thus functions from the Program Flash memory can be called
 * inside.
 */
void writeDataFlash()
{
    uint32 page;                                                /* Variable to cycle over all the pages             */

    /* --------------- ERASE PROCESS --------------- */
    /* Get the current password of the Safety WatchDog module */
    uint16 endInitSafetyPassword = IfxScuWdt_getSafetyWatchdogPassword();

    /* Erase the sector */
    IfxScuWdt_clearSafetyEndinit(endInitSafetyPassword);        /* Disable EndInit protection                       */
    IfxFlash_eraseMultipleSectors(DFLASH_STARTING_ADDRESS, DFLASH_NUM_SECTORS); /* Erase the given sector           */
    IfxScuWdt_setSafetyEndinit(endInitSafetyPassword);          /* Enable EndInit protection                        */

    /* Wait until the sector is erased */
    IfxFlash_waitUnbusy(FLASH_MODULE, DATA_FLASH_0);

    /* --------------- WRITE PROCESS --------------- */
    for(page = 0; page < DFLASH_NUM_PAGE_TO_FLASH; page++)      /* Loop over all the pages                          */
    {
        uint32 pageAddr = DFLASH_STARTING_ADDRESS + (page * DFLASH_PAGE_LENGTH); /* Get the address of the page     */

        /* Enter in page mode */
        IfxFlash_enterPageMode(pageAddr);

        /* Wait until page mode is entered */
        IfxFlash_waitUnbusy(FLASH_MODULE, DATA_FLASH_0);

        /* Load data to be written in the page */
        IfxFlash_loadPage2X32(pageAddr, DATA_TO_WRITE, DATA_TO_WRITE); /* Load two words of 32 bits each            */

        /* Write the loaded page */
        IfxScuWdt_clearSafetyEndinit(endInitSafetyPassword);    /* Disable EndInit protection                       */
        IfxFlash_writePage(pageAddr);                           /* Write the page                                   */
        IfxScuWdt_setSafetyEndinit(endInitSafetyPassword);      /* Enable EndInit protection                        */

        /* Wait until the data is written in the Data Flash memory */
        IfxFlash_waitUnbusy(FLASH_MODULE, DATA_FLASH_0);
    }
}

/* This function verifies if the data has been correctly written in the Data Flash */
void verifyDataFlash()
{
    uint32 page;                                                /* Variable to cycle over all the pages             */
    uint32 offset;                                              /* Variable to cycle over all the words in a page   */
    uint32 errors = 0;                                          /* Variable to keep record of the errors            */

    /* Verify the written data */
    for(page = 0; page < DFLASH_NUM_PAGE_TO_FLASH; page++)                          /* Loop over all the pages      */
    {
        uint32 pageAddr = DFLASH_STARTING_ADDRESS + (page * DFLASH_PAGE_LENGTH);    /* Get the address of the page  */

        for(offset = 0; offset < DFLASH_PAGE_LENGTH; offset += 0x4)                 /* Loop over the page length    */
        {
            /* Check if the data in the Data Flash is correct */
            if(MEM(pageAddr + offset) != DATA_TO_WRITE)
            {
                /* If not, count the found errors */
                errors++;
            }
        }
    }

    /* If the data is correct, turn on the LED2 */
    if(errors == 0)
    {
        IfxPort_setPinState(LED2, IfxPort_State_low);
    }
}

void core0_main(void)
{
    IfxCpu_enableInterrupts();
    
    /* !!WATCHDOG0 AND SAFETY WATCHDOG ARE DISABLED HERE!!
     * Enable the watchdogs and service them periodically if it is required
     */
    IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());
    IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword());
    
    /* Wait for CPU sync event */
    IfxCpu_emitEvent(&g_cpuSyncEvent);
    IfxCpu_waitEvent(&g_cpuSyncEvent, 1);
    
    /* Initialize the LEDs */
    initLEDs();

    /* Flash the Program Flash memory and verify the written data */
    writeProgramFlash();
    verifyProgramFlash();

    /* Flash the Data Flash memory and verify the written data */
    writeDataFlash();
    verifyDataFlash();

    while(1)
    {
    }
}

编译运行程序, 两个LED亮表示Flash操作成功.

在擦除和写PFLASH后面各打一个断点:

在这里插入图片描述

调试运行, Memory窗口中, 添加地址0xA00E0000, Resume程序, 第一个断点停止, 将显示0或0xEEEEEEEE, 因为它无法读取已擦除的内存, 再Resume, 第二个断点停止后, 应显示64个字节, 内容为0x07738135 :

在这里插入图片描述

同理, DFLASH查看地址0xAF000000:

在这里插入图片描述

微信公众号

欢迎扫描关注我的微信公众号, 及时获取最新文章:
在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

AURIX TC397 Flash编程 的相关文章

  • 在 Flash 对象内滚动时防止网页滚动

    我确信这一定是一个常见问题 但我在其他地方没有找到答案 我在一个长网页中嵌入了一个 Flash 对象 我侦听 Flash 中的 MOUSE WHEEL 事件 并相应地滚动 Flash 内容 但是 当我滚动 Flash 对象时 网页也会滚动
  • 如何检测浏览器是否支持flash?

    我的网站只有两个版本 一种是针对支持 Flash 的设计 如桌面设备 另一种是针对移动设备的设计 我只是想知道我是否可以检测到 如果是真的 支持 他们将保持相同的网站假设是http mywebsite com但链接会显示http myweb
  • Shape、Sprite、MovieClip 和其他显示对象:何时使用?

    有大量的显示对象flash display包裹 我不清楚在什么情况下应该使用Shape Sprite or MovieClip 使用它们各自的优点和缺点是什么 先感谢您 Shape http help adobe com en US Fla
  • NetStream.appendBytes

    我有一个连接到 Flash Media Server 的 netConnection 我正在尝试使用 Flash Player 10 1 中的新appendBytes 函数将本地FLV 文件流式传输到FMS 但是我遇到了问题 我在网上获取的
  • Actionscript 内存管理、垃圾收集

    这个博客 http blogagic com 163 flex memory management and memory leaks varref 和其他人 指出 在清理对象时 您应该在 dispose 方法中将对象引用设置为 null 但
  • 为什么 ActionScript 中没有记录 drawRoundRectComplex() ?

    在研究actionscript 3的图形类时 我遇到了未记录的drawRoundRectComplex 方法 它是一个变种drawRoundRect 但有 8 个参数 最后四个是每个角的直径 x y 宽度 高度 左上 右上 左下 右下 ex
  • Flash AS3 - 将多个对象拖放到一个目标?

    标题或多或少是不言自明的 我一直在学习许多不同的教程 而且说实话 我对 AS3 不太擅长 上图显示了我的目标 无论如何 我在我看到的大多数在线教程中注意到 拖放教程要么基于一个对象到一个目标 要么基于多个对象到多个目标 所以我想知道是否有人
  • 在 AS3 中快速设置关键帧上的实例名称

    现在在 Flash CS3 及更高版本 使用 Actionscript 3 中 如果您在图层中的多个关键帧中使用相同的实例 并且您决定稍后分配或更改实例名称 则必须转到每个关键帧并设置实例名称 这是一个很大的麻烦 有没有更快或更好的方法来做
  • 如何在多个 HTML 页面上播放背景音频?

    是否有解决方案可以让背景音频 音乐在网站上的多个页面上播放 而无需在每个页面加载时重新启动 该网站当前使用框架集 但我正在寻找替代方案 如果不让整个网站都 AJAX 我认为框架是唯一的方法 如果您需要的话 这里有一个关于制作 ajax 站点
  • Flash 点击时不打开链接

    我用 Flash 创建了这个横幅 我需要单击它来打开一个网页 我使用了这个 Actionscript 3 0 代码 link btn addEventListener MouseEvent CLICK openurl function op
  • 如何调整外部 SWF 的大小以适合容器?

    我想要完成的是调整外部 SWF 的大小 使其适合在舞台上作为容器呈现的显示对象 现在它显示在容器外部 重要提示 我不希望外部 SWF 占据整个舞台 我在舞台上为它准备了一个特殊的地方 那个容器 public function loaderC
  • 有没有办法覆盖动作脚本运算符,特别是我想覆盖等于运算符

    是否可以覆盖 equals 运算符 即 对于可以通过 2 个或更多字段匹配来确定相等性的客户类别 如果您的意思是重载 作为 equals 的同义词 那么您不能 因为 ActionScript 不提供运算符重载 只需为您的类编写一个 equa
  • Chrome 更新阻止 Flash 自动播放 - 如何避免?

    我在 html 页面中嵌入了 YouTube 视频 我将 youtube iframe API 与 Flash 结合使用 在我的例子中 我无法使用 HTML5 视频 自上次 Google Chrome 更新以来 Chrome 会阻止自动播放
  • AS3 中的 Flash 翻页卷曲效果

    我正在开发一个项目 需要使用 Flash 开发翻页 卷曲 效果 如下例所示 http www actionscript org showMovie php id 459http www actionscript org showMovie
  • 在android中加载swf文件时出现问题

    当我在 Android 模拟器中加载交互式 SWF 文件时遇到问题 我使用2 3 1 AVD 这是代码 package com androidpeople view import android app Activity import an
  • 如何在 PhantomJS 中使用 JavaScript 检测网页上的声音?

    我需要检测带有横幅的网页中的所有声音 我怎样才能做到这一点 我查看 PhantomJS 但找不到浏览器声音的 API PhantomJS 1 x 和 2 不支持 Flash
  • 打开 PDF 或文件夹

    我尝试打开在 Flash Player 中运行的 swf 应用程序中通过鼠标单击触发的 PDF 或文件夹 在查找器 资源管理器中 通过 urlRequest 打开 PDF 和navigateToUrl 总是打开浏览器 我读到this htt
  • ActionScript 3.0 中缺少运算符重载

    我在 ActionScript 中最怀念的事情之一是缺少运算符重载 特别是 我通过在我的类中添加 Compare 方法来解决这个问题 但这在很多情况下没有帮助 比如当你想使用内置字典之类的东西时 有没有好的方法来解决这个问题 Nope 但添
  • 更改 AS3 中的 TextField 选择颜色

    如何更改 ActionScript 3 中 TextField 的选择 突出显示 颜色 我有一个输入文本字段 黑色背景上有白色文本 因此 选择是不可见的 这对于可用性来说非常糟糕 谢谢 另一种方法是使用文本布局框架 特别是使用 Select
  • Flash 图表和图形的最佳解决方案是什么? [关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我知道融合图表 http www fusioncharts com 还有其他好的解决方案或 API 用

随机推荐

  • docker修改镜像名称以及tag版本

    docker tag 镜像ID 镜像名称 tag版本信息 docker tag 8ef375298394 mysql v5 7
  • npm安装报错解决合集(一)

    在新版nodejs已经集成了npm xff0c 所以npm也都安装好了 可以通过输入下面命令来测试是否成功安装 node v npm v 如果安装成功 xff0c 都会出现版本号 用npm v测试 xff0c 报错 xff1a node i
  • ES6系列——类数组转换为数组的几种方法以及for of、forin、for Each的区别

    以及目录 一 什么是类数组 xff1f 二 什么是类数组对象 xff1f 第一种方法 xff1a 使用for in 将类数组对象转换为数组 第二种方法 内置对象keys和valus 第三种方法 xff1a Array from for of
  • 对.net事件的看法

    一 事件的本质 事件是软件系统里的两个子系统之间 xff0c 或者两个模块之间 xff0c 或者两个对象之间发送消息 xff0c 并处理消息的过程 在面向对象的世界里 xff0c 就可以统一认为是两个对象之间的行为 两个对象之间发送的这种消
  • 深入理解module.exports、exports、require、export、export default、import

    前言 xff1a 说到module exports exports require export export default import这些 xff0c 有一点我们是必须要提一下的 xff0c 就是模块化编程方式 以上这些都是模块之间的
  • 服务器安全设置Centos7 防火墙firewall与iptables

    一 gt gt gt gt gt gt 启用centos7 iptables防火墙Centos7 防火墙firewall设置方法 我们Sinesafe在处理客户服务器Linux Centos7 64位系统里配置防火墙安全设置需要选择2种方案
  • VTK基本概念之坐标系统

    坐标系统 在实际开发中 xff0c 必须理解不同坐标系统之间的关系 计算机图形学里常用的四种坐标系 xff1a Model坐标系 Word坐标系 View坐标系和Display坐标系统 xff0c 转换关系如下图所示 VTK支持多种不同类型
  • STM32学习(蜂鸣器实验)

    蜂鸣器硬件电路连接 蜂鸣器软件设计 库函数 使能输入输出口时钟 调用函数RCC AHB1PeriphClockCmd 初始化输入输出口模式 调用函数GPIO Init 操作输入输出口 xff0c 输出高低电平 beep h ifdef BE
  • Esxi\CentOS7.6虚机\2080ti驱动 Unable to determine the device handle for GPU 0000:0B:00:00: Unknown ERROR

    整体背景 服务器使用Esxi虚拟出CentOS7 6的虚机 xff0c 然后在虚机中给2080ti显卡安装驱动 安装过程 1 配置显卡直通 此部分由运维完成 xff0c 未参与其中 xff0c 可参考攻略 xff1a https blog
  • 从断舍离中整理生活

    前言 公众号有一个多月未更文 xff0c 主要思考了后续更文的方向 xff0c 最终确定了以读书笔记分享为主题 xff0c 和大家一起学习 一起成长 今天开始 xff0c 每周至少更新一篇文章 xff0c 大家有想看的书可以在后台留言 xf
  • Android Studio升级到 3.2.0,部分依赖库报错 android.arch.lifecycle:runtime:1.0.3,解决办法

    Android Studio升级到 3 2 0 xff0c 部分依赖库报错 问题描述 xff1a Cannot find a version of android arch lifecycle runtime that satisfies
  • OpenCV4.7.0、FFmpeg5.1 Nvidia GPU视频硬解码

    1 环境 操作系统 xff1a Ubuntu18 04 GPU xff1a Nvidia GeForce RTX 2080TI 2 安装2080TI驱动 请参考文章 158条消息 NVIDIA GPU 驱动程序安装 洪流之源的博客 CSDN
  • MQ-2烟雾传感器的使用

    一 MQ 2烟雾传感器简介 MQ 2 烟雾传感器采用在清洁空气中电导率较低的二氧化锡 SnO2 xff0c 属于表面离子式N型半导体 当MQ 2烟雾传感器在200到300摄氏度环境时 xff0c 二氧化锡吸附空气中的氧 xff0c 形成氧的
  • HC-SR04超声波测距模块介绍

    超声波简介 超声波是由机械振动产生的 可在不同介质中以不同的速度传播 具有定向性好 能量集中 传输过程中衰减较小 反射能力较强等优点 超声波传感器可广泛应用于非接触式检测方法 它不受光线 被测物颜色等影响 对恶劣的工作环境具有一定的适应能力
  • 液晶12864显示图片

    液晶12864简介 12864是128 64点阵液晶模块的点阵数简称 基本参数 1 低电源电压 xff08 VDD 43 3 0 xff5e 43 5 5V xff09 2 显示分辨率 128 64 点 3 内置汉字字库 xff0c 提供8
  • 液晶12864显示字符

    液晶12864简介 12864是128 64点阵液晶模块的点阵数简称 基本参数 1 低电源电压 xff08 VDD 43 3 0 xff5e 43 5 5V xff09 2 显示分辨率 128 64点 3 内置汉字字库 xff0c 提供81
  • Bash:command:未找到命令

    前言 在Linux系统中 xff0c 经常会遇到这样的问题 xff1a bash xff1a command xff1a 未找到命令 这个真的很烧脑 xff0c 遇到的次数多 xff0c 在网上也查了好多 xff0c 答案五花八门 xff0
  • S32K148----SDK笔记----CAN收发

    文章目录 前言建立工程ProcessorExpert配置发送CAN报文CAN接收中断工程代码微信公众号 前言 S32K148自带3路CAN 官方的SDK给了can pal的例程 本文更基础一点 直接用flexcan组件相关的函数 CANFD
  • TC397开发板KIT_A2G_TC397_5V_TFT简介

    开发板简介 照片资料调试资源供电扩展CAN 用的开发板是KIT A2G TC397 5V TFT 其实更推荐KIT A2G TC397 3V3 TFT 售价 1 670 59 照片 正面 背面 5V的板子和3 3V的板子主要是下面几个器件不
  • AURIX TC397 Flash编程

    目录 Flash编程基础知识Flash Programming微信公众号 Flash编程基础知识 参考 Flash Programming 1 for KIT AURIX TC397 TFT 本例展示了如何烧写PFLASH Program