Patent Number: 
Section: claims

1. A charged-particle beam writing apparatus for writing a predetermined pattern on a sample placed on a stage with a charged-particle beam, the apparatus comprising:a height measuring unit that measures a height of the sample by irradiating the sample with light and receiving light reflected from the sample; anda control unit that receives either height data acquired from a height data map prepared based on values measured by the height measuring unit before writing or height data measured by the height measuring unit during writing to adjust an irradiation position of the charged-particle beam on the sample. 2. The charged-particle beam writing apparatus according to claim 1, wherein the height measuring unit measures the height of the sample in real time concurrently with writing. 3. The charged-particle beam writing apparatus according to claim 1, wherein when an amount of the reflected light is equal to or larger than a threshold value, the control unit receives height data measured by the height measuring unit during writing, and when the amount of the reflected light is less than the threshold value, the control unit receives height data acquired from the height data map. 4. The charged-particle beam writing apparatus according to claim 1, wherein the control unit receives height data acquired from the height data map as height data of coordinates within a predetermined region. 5. The charged-particle beam writing apparatus according to claim 4, wherein the apparatus comprising:a support mechanism that is provided so as to surround the sample placed on the stage,a substrate cover that is provided on the support mechanism,wherein the substrate cover is grounded by connecting the support mechanism to ground,wherein the predetermined region is a region where the irradiated light is blocked by the substrate cover. 6. The charged-particle beam writing apparatus according to claim 1, wherein when a difference between height data measured by the height measuring unit during writing and height data measured previously is equal to or less than a threshold value, the control unit receives the height data measured by the height measuring unit during writing, and when the difference is larger than the threshold value, the control unit receives height data acquired from the height data map. 7. A charged-particle beam writing apparatus for writing a predetermined pattern on a sample placed on a stage with a charged-particle beam, the apparatus comprising:a height measuring unit that measures a height of the sample by irradiating the sample with light and receiving light reflected from the sample; anda control unit that receives a value obtained by adding an offset value, obtained from a difference between height data acquired from a height data map prepared based on values measured by the height measuring unit before writing and height data measured by the height measuring unit during writing, to the height data map to adjust an irradiation position of the charged-particle beam on the sample. 8. The charged-particle beam writing apparatus according to claim 7, wherein the height data map contains height data including measured values, and height data including values determined from the measured values by interpolation. 9. The charged-particle beam writing apparatus according to claim 7, wherein the offset value is updated only when the amount of light reflected from the surface of the sample is equal to or larger than a threshold value. 10. A charged-particle beam writing method for writing a predetermined pattern on a sample placed on a stage with a charged-particle beam, the method comprising:measuring a height of the sample by irradiating the sample with light and receiving light reflected from the sample; andusing either height data acquired from a height data map prepared based on values measured before writing, or height data measured during writing to adjust an irradiation position of the charged-particle beam on the sample. 11. The charged-particle beam writing method according to claim 10, wherein the measurement of height of the sample is performed in real time concurrently with writing. 12. The charged-particle beam writing method according to claim 10, wherein when an amount of the reflected light is equal to or larger than a threshold value, using height data measured during writing, and when the amount of the reflected light is less than the threshold value, using height data acquired from the height data map. 13. The charged-particle beam writing method according to claim 10, wherein height data acquired from the height data map is received as height data of coordinates within a predetermined region. 14. The charged-particle beam writing method according to claim 13, a support mechanism is provided so as to surround a mask placed on a stage, andproviding a substrate cover on the support mechanism,wherein the substrate cover is grounded by connecting the support mechanism to ground, andwherein the predetermined region is a region where the irradiated light is blocked by the substrate cover. 15. The charged-particle beam writing method according to claim 10, wherein the height data measured during writing is used when a difference between height data measured during writing, and height data measured previously is equal to or less than a threshold value, and using height data acquired from the height data map when the difference is larger than the threshold value. 16. A charged-particle beam writing method for writing a predetermined pattern on a sample placed on a stage with a charged-particle beam, the method comprising:measuring a height of the sample by irradiating the sample with light and receiving light reflected from the sample; andusing a value obtained by adding an offset value, obtained from a difference between height data acquired from a height data map prepared based on values measured before writing, and height data measured during writing, to the height data map to adjust an irradiation position of the charged-particle beam on the sample. 17. The charged-particle beam writing method according to claim 16, wherein the height data map contains height data including measured values and height data including values determined from the measured values by interpolation. 18. The charged-particle beam writing method according to claim 16, wherein the offset value is updated only when the amount of light reflected from the surface of the sample is equal to or larger than a threshold value.