Maybe your TJA1050 device were disable. In my case when I tried to use CAN1 with my CAN Transceiver module (TJA1043T). I have to set EN and STB_N pin to HIGH level. Otherwise, the CAN would change to bus-off mode.