> On 1 Sep 2018, at 22:10, Martin Schreiber <[email protected]> wrote:
> 
> On 09/01/2018 07:59 AM, Martin Schreiber wrote:
>> On Friday 31 August 2018 16:33:24 Martin Schreiber wrote:
>>> 
>>> Yes. The question is how can MSEide reliably stop the DMA and all other
>>> actions in the target board before downloading. Shouldn't that be done by
>>> st-util/stlink?
>>> 
>> I assume the the DBGMCU register flags must be set accordingly by one way or 
>> another. You could try with a 'Target'-'Options'-'Debugger'-'Target'-'After 
>> connect gdb script'. Maybe it is too late then and the setting must be done 
>> by stlink.
>> 
> The gdb commands
> "
> set language c
> #DBGMCU_APB1_FZ, change the bit mask for your needs
> set {int}0xe0042008 = 0xffffffff
> #DBGMCU_APB2_FZ, change the bit mask for your needs
> set {int}0xe004200c = 0xffffffff
> set language pascal
> "
> for the script in 'Target'-'Options'-'Debugger'-'Target'-'After
> connect gdb script’ work for me with the STM32L100C DISCO board.

Unfortunately these do not control i2s & DMA, only timers and CAN.
NB you can set those regs via software, they are only cleared by POR.

I have found a reference:-
https://www.st.com/content/ccc/resource/technical/document/application_note/group0/3d/a5/0e/30/76/51/45/58/DM00354244/files/DM00354244.pdf/jcr:content/translations/en.DM00354244.pdf#page79
 
<https://www.st.com/content/ccc/resource/technical/document/application_note/group0/3d/a5/0e/30/76/51/45/58/DM00354244/files/DM00354244.pdf/jcr:content/translations/en.DM00354244.pdf#page79>

which shows (section 4.2 on page 31) there are three connection modes with 
stlink selectable from the dev systems.

’Normal, ’ConnectUnderReset and ‘Hotplug’

The second of these would appear to keep reset asserted, which would disable 
all peripherals.

Geoffrey
> 
> Martin
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> mseide-msegui-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to