6 years ago.

Camera input from CH 1

Is there any sample, showing how to initialize VDC5 when camera is attached on Channel 1 (for example, when this inputs are used)

static const PinMap PinMap_DV_INPUT_PIN[] = {
    {P1_5  , VDC5_CH1, 2}, /* DV1_CLK    */
    {P1_6  , VDC5_CH1, 2}, /* DV1_VSYNC  */
    {P1_7  , VDC5_CH1, 2}, /* DV1_HSYNC  */
    {P5_7  , VDC5_CH1, 4}, /* DV1_DATA7  */
    {P5_6  , VDC5_CH1, 4}, /* DV1_DATA6  */
    {P5_5  , VDC5_CH1, 4}, /* DV1_DATA5  */
    {P5_4  , VDC5_CH1, 4}, /* DV1_DATA4  */
    {P5_3  , VDC5_CH1, 4}, /* DV1_DATA3  */
    {P5_2  , VDC5_CH1, 4}, /* DV1_DATA2  */
    {P5_1  , VDC5_CH1, 4}, /* DV1_DATA1  */
    {P5_0  , VDC5_CH1, 4}, /* DV1_DATA0  */
    {NC    , NC   , 0}
};

PS: I've spent at least 2 days trying to get it running, but no luck. I even can't get an interrupt on any of these: INT_TYPE_S0_VFIELD, INT_TYPE_S1_VFIELD, INT_TYPE_S0_LO_VSYNC, INT_TYPE_S1_LO_VSYNC.

If I try to start the video of DisplayBase class with VIDEO_INPUT_CHANNEL_1 like so:

DisplayCAM.Video_Start(DisplayBase::VIDEO_INPUT_CHANNEL_1);

I always get VDC5_RESOURCE_ST_INVALID from VDC5_ShrdPrmGetRwProcReady() function.

This leads to err: VDC5_ERR_RESOURCE_LAYER, returned from R_VDC5_StartProcess().

Question relating to:

GR-PEACH is an Mbed enabled platform which combines the advantages of the Mbed ecosystem and Arduino UNO form factor.

1 Answer

6 years ago.

The driver for GR-PEACH is created on the premise that CH0 is used. If you want to use CH1, you need to modify the "gr_peach_vdc5.c". The part that needs to be changed is VDC5_CHANNEL_ 0 (13 places) and "PinMap_DV_INPUT_PIN" table.
Note: Implement CH1 processing in the "init_func()" function.

Accepted Answer

That helped a lot, but was not enough.

I think these rows:

VDC50.SC0_SCL1_WR2 = (uint32_t)framebuffer_t;
VDC50.SC0_SCL1_WR8 = (uint32_t)framebuffer_b;
VDC50.SC0_SCL1_UPDATE = 0x10;

should be like this

VDC51.SC0_SCL1_WR2 = (uint32_t)framebuffer_t;
VDC51.SC0_SCL1_WR8 = (uint32_t)framebuffer_b;
VDC51.SC0_SCL1_UPDATE = 0x10;

Is there any reason why R_VDC5_ChangeWriteProcess() function is not used here, so VDC5_CHANNEL_X could be used instead hardcorded regs?

posted by Vekatech Ltd. 19 Nov 2018

Yes. I think that the above change is necessary.
And probably the functions of DRV_Video_Write_Change() and R_VDC5_ChangeWriteProcess() are different.

posted by Daiki Kato 29 Nov 2018