waiting for reply.. anyone?
↧
How to Read/Write FLASH and EEPROM of (Infineon Tricore 1782)
↧
XMC4800: Vector table remap/relocation from flash to RAM (bootloader)
Hello,
working on a small bootloader project which parses an incoming .HEX file on UART and puts it to flash.
The incoming data is received by UART RX interrupt (USIC0_0_IRQHandler), which itself is put to RAM. The vector table is still located in flash, which will probably prevent any ISR call while erasing/writing flash. Or isn't this necessary at all?
1. The vector offset register (VTOR) is present as PPB->VTOR and SCB->VTOR. Which one I am supposed to use?
2. I know that the vector table must be placed in flash after start-up, because the reset handler cannot be run when placed in RAM. So I basically need to put the vector table in beginning of flash as well as RAM. How do I tell the linker script to do so?
Best regards,
Ernie
working on a small bootloader project which parses an incoming .HEX file on UART and puts it to flash.
The incoming data is received by UART RX interrupt (USIC0_0_IRQHandler), which itself is put to RAM. The vector table is still located in flash, which will probably prevent any ISR call while erasing/writing flash. Or isn't this necessary at all?
1. The vector offset register (VTOR) is present as PPB->VTOR and SCB->VTOR. Which one I am supposed to use?
2. I know that the vector table must be placed in flash after start-up, because the reset handler cannot be run when placed in RAM. So I basically need to put the vector table in beginning of flash as well as RAM. How do I tell the linker script to do so?
Best regards,
Ernie
↧
↧
XMC4700 Set PWM Frequency while running
Hi,
check the section Updating the Period and Duty Cycle in the CCU4 and CCU8 chapters.
Each CCUx timer slice provides an associated shadow register for the period and the
two compare values. This facilitates a concurrent update by software for these three
parameters, with the objective of modifying during run time the PWM signal period and
duty cycle.
The PWM_SVM might not fit your needs. Check the PWM_CCU4 and PWM_CCU8.
Regards,
Jesus
check the section Updating the Period and Duty Cycle in the CCU4 and CCU8 chapters.
Each CCUx timer slice provides an associated shadow register for the period and the
two compare values. This facilitates a concurrent update by software for these three
parameters, with the objective of modifying during run time the PWM signal period and
duty cycle.
The PWM_SVM might not fit your needs. Check the PWM_CCU4 and PWM_CCU8.
Regards,
Jesus
↧
XCM4500 ends up in the boot rom while debugging
Hi,
One reason for your observation could be a stack overflow. Do you have enabled the OS_STKCHECK?
Regards,
Jesus
One reason for your observation could be a stack overflow. Do you have enabled the OS_STKCHECK?
Regards,
Jesus
↧
I am looking to use the IRMCK099 in a new design, but I have the following question:
IRMCK099 on a new design
Hello All
I am looking to use the IRMCK099 in a new design, but I have the following question:
I assume that the IRMCK099 will run BLDC motors just as well as the PMSM's? I have found no documentation stating that the IRMCK099 is happy with BLDC however they do state that targets the drone market - which uses BLDC.
Hello All
I am looking to use the IRMCK099 in a new design, but I have the following question:
I assume that the IRMCK099 will run BLDC motors just as well as the PMSM's? I have found no documentation stating that the IRMCK099 is happy with BLDC however they do state that targets the drone market - which uses BLDC.
↧
↧
How to Get the PWM output pin level status in DAVE 4 ?
Hello ~
I am using DAVE 4 app :PWM_SVM now , I need to get the pwm output level [0,1] in my software , could you help me about this ?
thx a lot .
I am using DAVE 4 app :PWM_SVM now , I need to get the pwm output level [0,1] in my software , could you help me about this ?
thx a lot .
↧
On how to use matlab/simulink to simulate EVAL_M1_099M.mdl
Do you have any specific instructions or tutorials? Thank you.
↧
Several questions about using iMOTION
The following questions are asked:
First, after the program is written to the development board, how to operate the motor without opening the software can be achieved.
The value I entered in TargetSpeed, how to download it to the core, and how can I run the electricity without turning on MCEdesigner, and achieve the performance set in MCE designer. (There is a cap of 32767 for TargetSpeed, what can I do if I still improve the speed?
Two, how to view the program's C language code.
Three, the circuit diagrams of the two development boards can be downloaded.
Four, about MATLAB simulation whether there is any information, I want to do some simulation.
Five, in addition to programming with imotion, MCK099 chips can also be programmed to write.
Sixth, if my motor winding is triangular connection, is the resistance, inductance and KE measured first according to Y connection?
Thank you. May I ask the Engineer for help?
First, after the program is written to the development board, how to operate the motor without opening the software can be achieved.
The value I entered in TargetSpeed, how to download it to the core, and how can I run the electricity without turning on MCEdesigner, and achieve the performance set in MCE designer. (There is a cap of 32767 for TargetSpeed, what can I do if I still improve the speed?
Two, how to view the program's C language code.
Three, the circuit diagrams of the two development boards can be downloaded.
Four, about MATLAB simulation whether there is any information, I want to do some simulation.
Five, in addition to programming with imotion, MCK099 chips can also be programmed to write.
Sixth, if my motor winding is triangular connection, is the resistance, inductance and KE measured first according to Y connection?
Thank you. May I ask the Engineer for help?
↧
CCU8 and DMA at XMC4700
Hi,
now I oriantated me at the Example, but it dosn't work and i coudn't find the mistake...
now I oriantated me at the Example, but it dosn't work and i coudn't find the mistake...
Code:
#include <XMC4700.h>
#include <xmc_dma.h>
#include <xmc_uart.h>
#include "xmc_spi.h"
#include "xmc_gpio.h"
#define TICKS_PER_SECOND 1000
#define TICKS_WAIT 20
// Sys-Tick Counter
#define CORE_SysTickEn() (*((uint32_t*)0xE0001000)) = 0x40000001
#define CORE_SysTickDis() (*((uint32_t*)0xE0001000)) = 0x40000000
#define CORE_GetSysTick() (*((uint32_t*)0xE0001004))
#define SPI_MASTER_MISO P0_0
#define SPI_MASTER_MOSI P0_1
#define SPI_MASTER_SS P0_9
#define SPI_MASTER_SCLK P0_10
#define SPI_SLAVE_MISO P0_5
#define SPI_SLAVE_MOSI P1_4
#define SPI_SLAVE_SS P1_0
#define SPI_SLAVE_SCLK P1_1
#define LEDS 784
#define BUFFER_LENGTH (LEDS*2)+4
#define LEDDATABUFFER 1
#define BRIGHTNES 0x1F
#define APA102_STARTFRAME (uint32_t)0x00000000
#define APA102_STOPFRAME (uint32_t)0xFFFFFFFF
void sendAPA102(uint32_t LedData[1][4]);
XMC_USIC_CH_t *spi_master_ch = XMC_SPI1_CH1;
uint16_t buffer[BUFFER_LENGTH];
volatile bool transfer_done = false;
uint32_t LedData[LEDDATABUFFER][4] = {
{0x00,0x01,0x00,BRIGHTNES}}; //LED-Number + RGBS
uint32_t * LedData_ptr = &LedData[0][0]; //LED-Number + RGBS
XMC_DMA_CH_CONFIG_t dma_ch_config_master =
{
.src_addr = (uint32_t)&(buffer[0]),
.dst_addr = (uint32_t)&(USIC1_CH1->TBUF[0]),
.block_size = BUFFER_LENGTH,
.src_transfer_width = XMC_DMA_CH_TRANSFER_WIDTH_16,
.dst_transfer_width = XMC_DMA_CH_TRANSFER_WIDTH_16,
.src_address_count_mode = XMC_DMA_CH_ADDRESS_COUNT_MODE_INCREMENT,
.dst_address_count_mode = XMC_DMA_CH_ADDRESS_COUNT_MODE_NO_CHANGE,
.src_burst_length = XMC_DMA_CH_BURST_LENGTH_1,
.dst_burst_length = XMC_DMA_CH_BURST_LENGTH_1,
.transfer_flow = XMC_DMA_CH_TRANSFER_FLOW_M2P_DMA,
.transfer_type = XMC_DMA_CH_TRANSFER_TYPE_SINGLE_BLOCK,
.dst_handshaking = XMC_DMA_CH_DST_HANDSHAKING_HARDWARE,
.dst_peripheral_request = DMA0_PERIPHERAL_REQUEST_USIC1_SR0_0, // SR = 1, Line = 2;
.enable_interrupt = true
};
XMC_SPI_CH_CONFIG_t spi_master_config =
{
.baudrate = 5000,
.bus_mode = XMC_SPI_CH_BUS_MODE_MASTER,
.selo_inversion = XMC_SPI_CH_SLAVE_SEL_INV_TO_MSLS,
.parity_mode = XMC_USIC_CH_PARITY_MODE_NONE
};
void GPDMA0_0_IRQHandler(void)
{
transfer_done = true;
XMC_DMA_CH_ClearEventStatus(XMC_DMA0, 2, XMC_DMA_CH_EVENT_BLOCK_TRANSFER_COMPLETE);
}
/* ------------------------------------------------------------------ */
void SysTick_Handler(void)
{
static uint32_t ticks = 0;
ticks++;
if (ticks == TICKS_WAIT)
{
sendAPA102(LedData);
ticks = 0;
}
}
/* ------------------------------------------------------------------ */
uint32_t makeLedFrame(uint8_t R, uint8_t G, uint8_t B, uint8_t S) {
uint32_t LedFrame;
LedFrame = 0;
LedFrame = (LedFrame | 0x7) << 3;
LedFrame = (LedFrame | S) << 5;
LedFrame = (LedFrame | B) << 8;
LedFrame = (LedFrame | G) << 8;
LedFrame = LedFrame | R;
return(LedFrame);
}
/* ------------------------------------------------------------------ */
void sendAPA102(uint32_t LedDataToSend[LEDDATABUFFER][4]) {
uint32_t j = 2, LedFrame;
uint32_t Debug;
buffer[0] = (APA102_STARTFRAME & 0xFFFF0000)>>4;
buffer[1] = APA102_STARTFRAME & 0x0000FFFF;
for(uint32_t i = 0; i<LEDS; i++) {
LedFrame = makeLedFrame(LedDataToSend[0][0],LedDataToSend[0][1],LedDataToSend[0][2],LedDataToSend[0][3]);
buffer[j] = ((LedFrame & 0xFFFF0000) >> 16);
buffer[j+1] = LedFrame & 0x0000FFFF;
j=j+2;
}
buffer[BUFFER_LENGTH-2] = ((APA102_STOPFRAME & 0xFFFF0000) >> 16);
buffer[BUFFER_LENGTH-1] = APA102_STOPFRAME & 0x0000FFFF;
XMC_DMA_CH_Enable(XMC_DMA0, 2);
while (transfer_done == false);
transfer_done = false;
}
/* ------------------------------------------------------------------ */
int main(void)
{
/* Start sending periodic message */
SysTick_Config(SystemCoreClock / TICKS_PER_SECOND);
/* ------------------------------------------------------------------------- */
/* MASTER */
/* ------------------------------------------------------------------------- */
#if 1
/*Initialize and Start SPI Master*/
XMC_SPI_CH_Init(spi_master_ch, &spi_master_config);
XMC_SPI_CH_SetWordLength(spi_master_ch, 32);
XMC_SPI_CH_SetFrameLength(spi_master_ch, (32));
USIC1_CH1->PCR_SSCMode = 0x8001000F; // CS = LowActive
/*Input source selected for Master*/
XMC_SPI_CH_SetInputSource(spi_master_ch,XMC_SPI_CH_INPUT_DIN0,USIC1_C1_DX0_P0_0); // MISO
/*GPIO configuration for Master*/
XMC_GPIO_SetMode(SPI_MASTER_MOSI, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2);
XMC_GPIO_SetMode(SPI_MASTER_SS, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2);
XMC_GPIO_SetMode(SPI_MASTER_SCLK, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2);
XMC_GPIO_SetMode(SPI_MASTER_MISO, XMC_GPIO_MODE_INPUT_TRISTATE);
#endif
/* ------------------------------------------------------------------------- */
/* SLAVE */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/* MASTER DMA */
/* ------------------------------------------------------------------------- */
#if 1
XMC_DMA_Init(XMC_DMA0);
XMC_DMA_CH_Init(XMC_DMA0, 2, &dma_ch_config_master);
XMC_DMA_CH_EnableEvent(XMC_DMA0, 2, XMC_DMA_CH_EVENT_BLOCK_TRANSFER_COMPLETE);
NVIC_SetPriority(GPDMA0_0_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 63, 1));
NVIC_EnableIRQ(GPDMA0_0_IRQn);
XMC_SPI_CH_EnableEvent(XMC_SPI1_CH1, XMC_SPI_CH_EVENT_TRANSMIT_BUFFER);
XMC_USIC_CH_SetInterruptNodePointer(XMC_SPI1_CH1 , XMC_USIC_CH_INTERRUPT_NODE_POINTER_TRANSMIT_BUFFER,1);
XMC_SPI_CH_EnableEvent(XMC_SPI1_CH1, XMC_SPI_CH_EVENT_TRANSMIT_SHIFT);
XMC_SPI_CH_TriggerServiceRequest(XMC_SPI1_CH1, 0); /* make DMA ready */
#endif
/* ------------------------------------------------------------------------- */
/* SLAVE DMA */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
#if 1
// USIC0_CH0->DX2CR |= 0x1 << 8; // ?
XMC_SPI_CH_Start(spi_master_ch);
#endif
while(1) {
}
}
↧
↧
How to Read/Write FLASH and EEPROM of (Infineon Tricore 1782)
waiting for reply.. anyone?
↧
XMC4800: Vector table remap/relocation from flash to RAM (bootloader)
To answer my own question ...
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
In startup assembler file (reset handler), an entry has been added to the copy table to make the start-up script copy vector table from flash to new location in RAM.
In same file the relocate-to-RAM method is called just before main() is called. The relocation could possible be performed in SystemCoreSetup(), but this method is called right at the beginning of the reset handler, where the RAM content has not been loaded and therefore the new RAM vector table is not populated. So I decided to add the new method SYSTEM_relocateVectorsToRam().
In startup_XMC4800.s:
In system_XMC4800.c:
Improvements are welcome, like not hard-coding the size of SYSTEM_ramVectors[].
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
Code:
<snip>
Stack (NOLOAD) :
{
__stack_start = .;
. = . + stack_size;
__stack_end = .;
__initial_sp = .;
} > SRAM_combined
/* vector table in RAM (aligned to 1024 byte) */
.ram_vectors (NOLOAD) : {
. = ALIGN(1024);
__ram_vectors_start = .;
* (.ram_vectors);
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_vectors_end = .;
} > SRAM_combined
__ram_vectors_size = __ram_vectors_end - __ram_vectors_start;
/* functions with __attribute__((section(".ram_code"))) */
.ram_code :
{
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_code_start = .;
<snip>
Code:
<snip>
__copy_table_start__:
.long __data_load, __data_start, __data_size
.long __ram_code_load, __ram_code_start, __ram_code_size
.long __Vectors, __ram_vectors_start, __ram_vectors_size
__copy_table_end__:
<snip>
In startup_XMC4800.s:
Code:
<snip>
/* relocate vectors to RAM */
ldr r0, =SYSTEM_relocateVectorsToRam
blx r0
ldr r0, =main
blx r0
<snip>
Code:
<snip>
__attribute__((section(".ram_vectors")))
uint8_t SYSTEM_ramVectors[512]; /** Place holder for vector table in RAM. Will be placed in correct segment by linker,
filled by reset vector and activated by SYSTEM_relocateVectorsToRam() */
/**
* Relocate vectors to RAM.
*
* Must be called after assembler start-up script performed the copy operation from flash.
*/
void
SYSTEM_relocateVectorsToRam(void) {
/* relocate vector table to RAM */
__disable_irq();
SCB->VTOR = (uint32_t) &SYSTEM_ramVectors;
__DSB();
__enable_irq();
}
<snip>
↧
SDMMC app upgrade issues (4.0.22 -> 4.3.22
Hi,
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
↧
How to Read/Write FLASH and EEPROM of (Infineon Tricore 1782)
waiting for reply.. anyone?
↧
↧
XMC4800: Vector table remap/relocation from flash to RAM (bootloader)
To answer my own question ...
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
In startup assembler file (reset handler), an entry has been added to the copy table to make the start-up script copy vector table from flash to new location in RAM.
In same file the relocate-to-RAM method is called just before main() is called. The relocation could possible be performed in SystemCoreSetup(), but this method is called right at the beginning of the reset handler, where the RAM content has not been loaded and therefore the new RAM vector table is not populated. So I decided to add the new method SYSTEM_relocateVectorsToRam().
In startup_XMC4800.s:
In system_XMC4800.c:
Improvements are welcome, like not hard-coding the size of SYSTEM_ramVectors[].
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
Code:
<snip>
Stack (NOLOAD) :
{
__stack_start = .;
. = . + stack_size;
__stack_end = .;
__initial_sp = .;
} > SRAM_combined
/* vector table in RAM (aligned to 1024 byte) */
.ram_vectors (NOLOAD) : {
. = ALIGN(1024);
__ram_vectors_start = .;
* (.ram_vectors);
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_vectors_end = .;
} > SRAM_combined
__ram_vectors_size = __ram_vectors_end - __ram_vectors_start;
/* functions with __attribute__((section(".ram_code"))) */
.ram_code :
{
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_code_start = .;
<snip>
Code:
<snip>
__copy_table_start__:
.long __data_load, __data_start, __data_size
.long __ram_code_load, __ram_code_start, __ram_code_size
.long __Vectors, __ram_vectors_start, __ram_vectors_size
__copy_table_end__:
<snip>
In startup_XMC4800.s:
Code:
<snip>
/* relocate vectors to RAM */
ldr r0, =SYSTEM_relocateVectorsToRam
blx r0
ldr r0, =main
blx r0
<snip>
Code:
<snip>
__attribute__((section(".ram_vectors")))
uint8_t SYSTEM_ramVectors[512]; /** Place holder for vector table in RAM. Will be placed in correct segment by linker,
filled by reset vector and activated by SYSTEM_relocateVectorsToRam() */
/**
* Relocate vectors to RAM.
*
* Must be called after assembler start-up script performed the copy operation from flash.
*/
void
SYSTEM_relocateVectorsToRam(void) {
/* relocate vector table to RAM */
__disable_irq();
SCB->VTOR = (uint32_t) &SYSTEM_ramVectors;
__DSB();
__enable_irq();
}
<snip>
↧
SDMMC app upgrade issues (4.0.22 -> 4.3.22
Hi,
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
↧
XMC_SCU_HIB_SetRtcClockSource function access to NULL pointer
Thanks KDogll.
Your solution very helpful for me.
Your solution very helpful for me.
↧
How to Read/Write FLASH and EEPROM of (Infineon Tricore 1782)
waiting for reply.. anyone?
↧
↧
XMC4800: Vector table remap/relocation from flash to RAM (bootloader)
To answer my own question ...
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
In startup assembler file (reset handler), an entry has been added to the copy table to make the start-up script copy vector table from flash to new location in RAM.
In same file the relocate-to-RAM method is called just before main() is called. The relocation could possible be performed in SystemCoreSetup(), but this method is called right at the beginning of the reset handler, where the RAM content has not been loaded and therefore the new RAM vector table is not populated. So I decided to add the new method SYSTEM_relocateVectorsToRam().
In startup_XMC4800.s:
In system_XMC4800.c:
Improvements are welcome, like not hard-coding the size of SYSTEM_ramVectors[].
1. SCB->VTOR needs to be updated. See SystemCoreSetup(). PPB->VTOR will be updated automatically.
2. Created a linker segment, which is placed between stack and .ram_code. The segment must be aligned to 1024 byte in RAM, otherwise relocation will fail (probably?).
Code:
<snip>
Stack (NOLOAD) :
{
__stack_start = .;
. = . + stack_size;
__stack_end = .;
__initial_sp = .;
} > SRAM_combined
/* vector table in RAM (aligned to 1024 byte) */
.ram_vectors (NOLOAD) : {
. = ALIGN(1024);
__ram_vectors_start = .;
* (.ram_vectors);
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_vectors_end = .;
} > SRAM_combined
__ram_vectors_size = __ram_vectors_end - __ram_vectors_start;
/* functions with __attribute__((section(".ram_code"))) */
.ram_code :
{
. = ALIGN(4); /* section size must be multiply of 4 */
__ram_code_start = .;
<snip>
Code:
<snip>
__copy_table_start__:
.long __data_load, __data_start, __data_size
.long __ram_code_load, __ram_code_start, __ram_code_size
.long __Vectors, __ram_vectors_start, __ram_vectors_size
__copy_table_end__:
<snip>
In startup_XMC4800.s:
Code:
<snip>
/* relocate vectors to RAM */
ldr r0, =SYSTEM_relocateVectorsToRam
blx r0
ldr r0, =main
blx r0
<snip>
Code:
<snip>
__attribute__((section(".ram_vectors")))
uint8_t SYSTEM_ramVectors[512]; /** Place holder for vector table in RAM. Will be placed in correct segment by linker,
filled by reset vector and activated by SYSTEM_relocateVectorsToRam() */
/**
* Relocate vectors to RAM.
*
* Must be called after assembler start-up script performed the copy operation from flash.
*/
void
SYSTEM_relocateVectorsToRam(void) {
/* relocate vector table to RAM */
__disable_irq();
SCB->VTOR = (uint32_t) &SYSTEM_ramVectors;
__DSB();
__enable_irq();
}
<snip>
↧
SDMMC app upgrade issues (4.0.22 -> 4.3.22
Hi,
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
The code you mentioned should not be generated for XMC1 family.
It is a bug in the SDMMC_BLOCK APP v.4.0.24.
Use the attached fixed version. To install it:
1. Download and unzip the update site.
2. Use menu Help>Install DAVE APP/Example/Device Libray...
3. Click on Add.. and then in Local button
4. Browse to the folder where you unzip the update site. Select the folder containing the update site. Click Ok
Attachment 3672
5. Select the SDMMC_BLOCK APP. Click Next
Attachment 3673
6. Step through the rest of the dialogs, and after a restart the new version of the SDMMC_BLOCK will be available.
7. You should be able to upgrade your project. Select to upgrade including beta versions
Attachment 3674
Hope this helps until the release of new version of the APP.
Otherwise, are you using the LED/write protection? If not please deselect them. It will also fix the issue.
Regards,
Jesus
↧
Diferenciating PORST pin and power on reset for watchdog test
Hello,
We are using an XMC4500 in a safety critical application.
We have an external Watchdog connected to PORST pin which will pull PORST down
and perform a PORST reset if we do not service it periodically.
So far so good...
Now we need to test the Watchdog hardware at power on to make sure it works.
To do that, we store a flag in some non volatile RAM, I was hopping to use GPR registers.
But they are cleared by PORST.
It is therefore impossible to differentiate a PORST from a Watchdog test puling down PORST pin.
Does someone suggest me another Non volatile memory area that would persist to PORST ?
ABM?
Hibernate mode registers ?
Has someone some experience or an idea on how to test an external WD circuit.
Thanks a lot for your suggestions or ideas.
Jorge
We are using an XMC4500 in a safety critical application.
We have an external Watchdog connected to PORST pin which will pull PORST down
and perform a PORST reset if we do not service it periodically.
So far so good...
Now we need to test the Watchdog hardware at power on to make sure it works.
To do that, we store a flag in some non volatile RAM, I was hopping to use GPR registers.
But they are cleared by PORST.
It is therefore impossible to differentiate a PORST from a Watchdog test puling down PORST pin.
Does someone suggest me another Non volatile memory area that would persist to PORST ?
ABM?
Hibernate mode registers ?
Has someone some experience or an idea on how to test an external WD circuit.
Thanks a lot for your suggestions or ideas.
Jorge
↧