By the way, I still do not see what could possible be wrong with Wire.setClock(). Here is where this code ends up:
/*
* Function twi_setClock
* Desc sets twi bit rate
* Input Clock Frequency
* Output none
*/
void twi_setFrequency(uint32_t frequency)
{
TWBR = ((F_CPU / frequency) - 16) / 2;
/* twi bit rate formula from atmega128 manual pg 204
SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))
note: TWBR should be 10 or higher for master mode
It is 72 for a 16mhz Wiring board with 100kHz TWI */
}
F_CPU is defined as 48000000 for the M0 board. So this function evaluates to ((48000000/100000)-16)/2 = 232
Anything wrong with that?