2017-05-15 02:52 AM
iam working in stm31l152rct6. iam starting to create a iap bootloader (that get from st.com)when programme (FLASH_ProgramHalfPage) reaches half page word write it shows cant acess target device. i don't know whats the reason(debugging shows :- cant acess target device shutdown the debug process and terminate debug window).....any body help me please
#stm32l #stm32l1 #stm32l-discovery2017-05-15 06:22 AM
Hi
ajit.alan
,Could you precise in which version of STM32L1 HAL library you have found the issue. So, we can verify it.
Otherwise please try to use the last version 1.7.0, as an issue related to the half page programming is already fixed on this version.
-Nesrine-
2017-05-15 07:15 AM
If the device goes into a sleep mode or resets, you might lose connectivity. Do you have a watchdog running?
Suggest you use a USART as a diagnostic/telemetry output method.
2017-05-15 07:29 AM
Nesriam Iam using older liberaries but when iam ported stm32l0 iap to l1 using new version hal libraries,but its not working it cant take bin file from terminal(ymodem protocol) ........clive am not using watchdog
2017-05-16 06:45 AM
dear friends,
i have another question if i load my programme in internal flash memory and next i entered in boot mode and using external flash for loading programme(another programme).is it possible if switching programme by change the base adresss(enterd boot mode and changing base adress).......i am working with stm32l152rct6. iam not much aware about this side if any mistake in my qusetion sorry...........please help me
2017-05-17 04:53 AM
Nesriam Iam using older liberaries but when iam ported stm32l0 iap to l1 using new version hal libraries,but its not working it cant take bin file from terminal(ymodem protocol)..........now its working crc check problem , now iam not checking crc directly load to internal flash.............but its start write
while(count < 32)
{ *(__IO uint32_t*) ((uint32_t)(Address + (4 * count))) = *pBuffer; pBuffer++; count ++; }when i debugging now its show'
Could not stop Cortex-M device! Please check the JTAG cable'
am not using jtag (discover board:stm32l152rct6)
2017-05-17 04:54 AM
clive am not using watch dog............its hang in
while(count < 32)
{ *(__IO uint32_t*) ((uint32_t)(Address + (4 * count))) = *pBuffer; pBuffer++; count ++; }here no idea whats the reason
2017-05-17 07:39 AM
So follow the advice. Take the debugger out of the equation, have a proper Hard Fault handler so you can get output if it gets there. Instrument your code so it outputs the addresses, and memory content for both the source and destination above to a terminal. You can remark out the actual writing code in the loop to just see what it is attempting.
Going to have issues with unaligned addresses, and non-empty flash cells.
Not sure why the debugger drops, commonly device entering low power modes, or reconfiguring pins. Not familiar with your design.
2017-05-18 12:05 AM
its not entering haurd fault handler.erasing of flash has no problem thats work fine but when try to write dont know why behave like this.when i stopped the debugger (its take too much time - no output) the debugger reach the point(
*(__IO uint32_t*) ((uint32_t)(Address + (4 * count))) = *pBuffer;) and stops with message 'cannot acess target' adress not increamented its in intial stage............totally am stuck
while(count < 32)
{
*(__IO uint32_t*) ((uint32_t)(Address + (4 * count))) = *pBuffer; (this point)
pBuffer++;
count ++;
}