insane-adding-machines / unicore-mx

UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X
GNU General Public License v3.0
50 stars 8 forks source link

*usbd_dwc_otg:misaligned membuf #45

Open alexrayne opened 7 years ago

alexrayne commented 7 years ago

provided load/store ep fifo with unaligned transfer membuffer.

     now memory buffer of transfer can be unaligned with negligible price.

! :last bytes store - fixed loose of last loaded from fifo bytes caused by memcopy call otimisation on keil ARMcc.

kuldeepdhaka commented 7 years ago

Are you trying to fix a [single] compiler specific bug in the library?

alexrayne commented 7 years ago

No, i`ve try to improove FS driver to use misaligned transfers for HS with DMA usage - it is useless

kuldeepdhaka commented 7 years ago

@alexrayne All uC that have this periph have support for unaligned memory access. What is the point of optimization?

imo If you write a comment noting the above assumption (unaligned memory access supported is assumed), that would be better.

alexrayne commented 7 years ago

well, if you`re are wright - it easy to check, just read uint32 from adress xxxx01, and look at HardFault on ARM CM4