Could you please elaborate your issue a bit more, so that we can provide you a possible solution?
Also, please let us know which version for Photoshop are you using & on which operating system?
Please try resetting the preferences of Photoshop & let us know if it helps: Preferences in Photoshop
If the above suggestion doesn't work then make sure that you are using the latest drivers for your tablet.
I would be happy to tell you more about my issue. Recently, I have discovered that it doesn't actually draw in white. It simply changes to the eraser tool. While it may look like it is in the pencil tool, it's not. Also, whenever I use my stylus, no matter what tool I'm using, it draws (Keep in mind that it doesn't actually draw, it turns into an eraser). For example, if i'm using the stamp tool, then I draw with my stylus, it turns into an eraser. Even though it looks like I have the stamp tool equipped.
I'm currently using macOS High Sierra v10.13.2.
I'm using Photoshop CC 2018.
I am not familiar with the Huion H640P. Did you instal a driver utility for the pen? I’ve only used Wacom products and they are managed with a utility that controls preferences, including eraser and pen pressure settings. The solution to your problem is probably with the pen, not Photoshop. Check and make sure you have the most currently utitlity installed for the pen.