Enabling pins of Arduino Due with direct port manipulation
I suggest the following test:  Use REG_PIOB_SODR = 1&lt;&lt;27; to set the bit, and  REG_PIOB_CODR = 1&lt;&lt;27; to clear it.  If that works ok, see about enabling synchronous data output via the port's PIO_OWSR register.  (If it doesn't work ok, perhaps review section 31.6, “I/O Lines Programming Example”, on page 629 of Atmel document 11057, the Cortex datasheet.)

Section 31.5.5, “Synchronous Data Output”, on page 623 says in part:


  After reset, the synchronous data output is disabled on all the I/O lines as PIO_OWSR resets at 0x0.


I imagine that writes to REG_PIOB_SODR and  REG_PIOB_CODR should have effect after you enabled output by setting bits in PIOB->PIO_PER and PIOB->PIO_OER, which you did.  However, with the bit in PIO_OWSR being clear, synchronous data output isn't available, so writes to REG_PIOB_ODSR have no effect.