This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Break-Point Expressions

Hi guys. Its been a while since I've posted, yet I still browse the forums daily.

I'm working on an STM320F103E project which interfaces with an FPGA via memory mapping.

The code is functional, but 'for some reason' the processor is accessing memory at 0x68008000 and at 0x6800A000 as observed in ChipScope within the Xilinx FPGA.

As you know by now, I really hate not knowing everything that my code is doing, so this really upsets me.

Although the interface to the FPGA is in BANK3 at 0x68018000 & 0x68018002, the code is accessing memory that I don't know about or remember yet.

All of this code works. (No problems here)
I just wanted to share the basic access performed:
I don't read/write externally anywhere else (that I know)

typedef volatile unsigned int    vu16;
typedef volatile unsigned long   vu32;
typedef          unsigned long    u32;

#define BANK3_PSRAM             ( (vu32)0x68000000 )          // 0x6800.0000-0x68FF.FFFF
#define FPGA_BASE_ADDRESS       ( BANK3_PSRAM + 0x00000000 )  // FPGA mapped base

#define FPGA_ROTARY_DIRECT_DATA_LSW *( (vu32 *) (u32) ( FPGA_BASE_ADDRESS + 0x00018000 ) )
#define FPGA_ROTARY_DIRECT_DATA_MSW *( (vu32 *) (u32) ( FPGA_BASE_ADDRESS + 0x00018002 ) )

vu32 The_Encoder_Value; // 'global' for testing

void FPGA_Test_RW( void ) // redacted routine for this post
{
    vu16 rotary_encoder_lsw; // 16-bit external access to FPGA (least significant word)
    vu16 rotary_encoder_msw; // 16-bit external access to FPGA (most significant word)

    rotary_encoder_lsw = FPGA_ROTARY_DIRECT_DATA_LSW;
    rotary_encoder_msw = FPGA_ROTARY_DIRECT_DATA_MSW;

    The_Encoder_Value  =  ( ((u32) rotary_encoder_msw)<<16 ) | rotary_encoder_lsw;
}

I'd like to set a break point on writing or reading to/from 0x68008000 & 0x6800A000, but the Expression Help doesn't explain the syntax well enough.

Yes, I did a 'little' research first, but decided to ask the forum how to do this, or better yet, provide a link that explains the Expression syntax better.

--Cpt. Vince Foster
2nd Cannon Place
Fort Marcy Park, VA

Parents
  • Thanks Gp F !

    It worked.
    You nailed it.

    I had to enter it via command-line, and not the Breakpoints Dialog box. (It shows up in the dialog box after the command-line command is entered).

    Yup, it turns out that some "temporary" diagnostic code was still burried in one of my isr routines when I first started interfacing with the FPGA at 0x68008000 / 0x6800A000.

    Problem solved. Thanks again.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • Thanks Gp F !

    It worked.
    You nailed it.

    I had to enter it via command-line, and not the Breakpoints Dialog box. (It shows up in the dialog box after the command-line command is entered).

    Yup, it turns out that some "temporary" diagnostic code was still burried in one of my isr routines when I first started interfacing with the FPGA at 0x68008000 / 0x6800A000.

    Problem solved. Thanks again.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children
No data