DSPIC33 SPI Master chip select line not working
From the datasheet and example codes, the Receive Buffer Flag is sufficient to tell us when the TX event is complete and thus the CS can toggle. It is a bit strange why there isnt a flag for this chip that tells us when the SPI shift register has transmitted all its data. All the example code only check the Receive buffer flag.

After a lot of head scratching, trial and error and finally the microchip forums, i can confirm that this code works:

   uint8_t Write_SPI1(uint8_t command) { //Does work    
    SPI1BUF = command; // send data over SPI
    while(!SPI1STATbits.SPIRBF) ; //wait until SPIRBF goes high  
    return SPI1BUF; //KEY STATEMENT THAT MADE A DIFFERENCE, Return the actual data received
    }


Along with this code, if your peripheral depends on Peripheral Pin Select (SPI2,SPI3 etc), it is important to define not only a SPI Clock Out but also a SPI Clock In even if you are in master mode

However, what is rather baffling to me is that this code (that i think should do the same thing) does not work:

  void Write_SPI1(uint8_t command) { //Does not work, premature toggle of CS, tried this code initially....
    uint8_t garbage;
    SPI1BUF = command; // send data over SPI
    while(!SPI1STATbits.SPIRBF) ; //wait until SPIRBF goes high 
    garbage = SPI1BUF; // read dummy data, does not seem to clear the flag as expected
    }