How to implement SPI interface in RX631

Hi all,

 I have to update an old project made with HEW (High-performance Embedded Workshop).

The micro is from the RX631 family (R5F5631BDDFB).

I have to implement an SPI peripheral in master mode (SPI7 on pins P90, P91, P92, P93). I have never implemented SPI before.

I would like to keep the project in HEW.

Could you tell me if there are any application notes or portions of code to understand how to implement it?

I would need to know how to configure the registers, the functions for reading-writing etc..

thanks

Stefano