1

I'm trying to utilize the BCM2835's BSC/SPI slave peripheral to use the Pi as an effective I2C slave, however I've been running across some segmentation faults when I try to write to the configuration register to enable the slave. Examination with gdb shows that the issue occurs when Mike M is trying to run the following assembly:

__asm__("\
mov r10,#0               \n\
mcr p15,0,r10, c7, c10, 5\n\
ldr %[ret], [%[paddr]]   \n\
mcr p15,0,r10, c7, c10, 5\n"
: [ret] "=r" (ret) : [paddr] "r" (paddr) : "r10", "memory" );

While it's worked thus far for all of his code, I'm having issues hooking onto that. Is there any reason why I should still worry about the memory barriers that his code offers? And additionally, is there any other way I can view and manipulate the register values with memory barriers other than the ones he's got?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.