[fpc-devel] Problem with bitpacked records and STM32F107 Controller
Sven Barth
pascaldragon at googlemail.com
Wed Dec 11 09:28:03 CET 2013
Am 11.12.2013 08:43, schrieb Michael Ring:
> The strb command seems to be the problem, documentation from STM states:
>
> Each I/O port bit is freely programmable, however the I/O port
> registers have to be accessed as 32-bit words (half-word or byte
> accesses are not allowed).
>
> So, is there some way to make the bitset operations word-aligned?
Better say 32-bit aligned to avoid confusion. Words in Pascal are 16-bit
although I know that you are talking about the CPUs word size...
> Are there any good reasons for not doing so?
What when you really have a byte that you want ot access? Then using
32-bit writes/reads could(*) result in unnecessary cycles.
* I don't know about ARM especially, but I know that for e.g. the m68k a
32-bit store is more expensive than a 16-bit or 8-bit store
That said I don't have a solution for your specific problem except by
doing it by hand.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20131211/fbecf695/attachment.html>
More information about the fpc-devel
mailing list