For Mikroe team: STM32H7 Wrong Registers Values

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
s_sergiu
Posts: 77
Joined: 10 Jan 2012 15:09

For Mikroe team: STM32H7 Wrong Registers Values

#1 Post by s_sergiu » 28 Apr 2020 18:18

Hello Mikroe Team,

While I was reading reference manual for STM32H743 countless times to figure out why DMA is not working at all compared with STM32F4,
I found that values writen in registers in the code are different than the ones after compiling:

For registers DMA_SxFCR and DMA_SxCR values are correct up to 7 bits:
if DMA_S2CR = %1111111 , the actual value in register after compiling is 127 which is correct
but if DMA_S2CR = %11111111, the actual value is 222 instead of 255.

I checked STM32H743ZI.mbas file and definitions for above registers look as per reference manual so problem does not seem to be there.
I also tried the following following :
DMA2_S2CR.PL1=1
DMA2_S2CR.PL0=1
or
PL1_bit = 1
PL0_bit = 1
or
PL1_DMA2_S2CR_bit = 1
PL0_DMA2_S2CR_bit = 1
or
DMA2_S2CR.17=1
DMA2_S2CR.16=1
But none of them are setting properly the bits.

Please fix all this issues which are time consuming and very frustrating.

Thank you,
Sergiu

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: For Mikroe team: STM32H7 Wrong Registers Values

#2 Post by filip » 04 May 2020 07:35

Hi,

I suppose this is related to the following posts as well ?
viewtopic.php?f=185&t=76577
viewtopic.php?f=185&t=76555

Regards,
Filip.

s_sergiu
Posts: 77
Joined: 10 Jan 2012 15:09

Re: For Mikroe team: STM32H7 Wrong Registers Values

#3 Post by s_sergiu » 04 May 2020 10:07

Hello Filip,

Yes. They are related to same issue. Some bits in registers cannot be written to 1 or they go in wrong position,for example register.17 = 1 and register.16 = 1 will write 1 on register.12 and register.11
It was just luck that with 0 on some positions was the required setting for my particular case .

Thank you for having a look on to this issue.
Regards,
Sergiu

Post Reply

Return to “mikroBasic PRO for ARM General”