Sign in

username:

password:



Not a member?

Search f24x



Search tips

Subscribe to f24x





Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C24x | CRC_16_CCITT

Technical discussions about the TI c24x DSPs (including the C2401A, C2402A, C2403A, C2406A, F2401, F2402, F2403, F2406, and F2407).

  

Post a new Thread

CRC_16_CCITT - ilmo...@yahoo.es - Sep 12 7:27:35 2007

Hello, (the text of the other thread 'CRC' was incomplete)

I want to calculate the CRC_16 of my memory flash. I have the routins and I know
the way to do it.
I have a especial table to calculate a fast CRC_16, and I need to save it also
in flash. The matter here is that I want to save the CRC value in a specific
location in memory flash.
I declare as a const my table and then in my main I write:

            	#pragma           DATA_SECTION (crc_16_ccitt, "sec_crc")

		unsigned int      crc_16_ccitt;

Acording the memory map(see below), the variable 'crc_16_ccitt' should store the
CRC value in position 07F44h.
I compile the code but 'crc_16_ccitt' isn't where I want.

Has anybody used de 'pragma' directive?

MEMORY
{
    PAGE 0 :    VECTORS: origin =    0h , length =    40h   /* VECTORS */
                CODE   : origin =   44h , length = 07F00h   /* PROGRAM */
		CRC	:origin =	07F44h, length = 1h	/* CRC_16 */

    PAGE 1 :   MMRS    : origin = 0000h , length =   060h  /* MMRS  */
               DARAM_B2: origin = 0060h , length =   020h  /* DARAM */
               DARAM_B0: origin = 0200h , length =  0100h  /* DARAM */
               DARAM_B1: origin = 0300h , length =  0100h  /* DARAM */
               SARAM   : origin = 0800h , length =  0800h  /* SARAM */
               
}

SECTIONS
{
        .text   :> 	CODE     PAGE 0
        .cinit  :> 	CODE     PAGE 0
        .data   :> 	SARAM    PAGE 1
        .stack  :> 	SARAM    PAGE 1
        .bss    :> 	SARAM    PAGE 1
        .vectors:> 	VECTORS  PAGE 0
	.const  :> 	CODE	PAGE 0
        sec_crc :>  	CRC	PAGE 0  		
}



 




(You need to be a member of f24x -- send a blank email to f24x-subscribe@yahoogroups.com )